home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
dev
/
obero
/
oberon_lib.lha
/
oberon-a
/
source1.lha
/
source
/
Amiga
/
Intuition.mod
< prev
next >
Wrap
Text File
|
1994-08-08
|
184KB
|
4,898 lines
(**************************************************************************
$RCSfile: Intuition.mod $
Description: Interface to intuition.library
Created by: fjc (Frank Copeland)
$Revision: 3.2 $
$Author: fjc $
$Date: 1994/08/08 00:58:11 $
Includes Release 40.15
(C) Copyright 1985-1993 Commodore-Amiga, Inc.
All Rights Reserved
Oberon-A interface Copyright © 1994, Frank Copeland.
This file is part of the Oberon-A Interface.
See Oberon-A.doc for conditions of use and distribution.
***************************************************************************)
MODULE Intuition;
(*
** $C- CaseChk $I- IndexChk $L+ LongAdr $N- NilChk
** $P- PortableCode $R- RangeChk $S- StackChk $T- TypeChk
** $V- OvflChk $Z- ZeroVars
*)
IMPORT
E := Exec, T := Timer, U := Utility, G := Graphics, IE := InputEvent,
KM := KeyMap, SYS := SYSTEM;
(*-- Pointer declarations ---------------------------------------------*)
TYPE
MenuPtr * = CPOINTER TO Menu;
MenuItemPtr * = CPOINTER TO MenuItem;
RequesterPtr * = CPOINTER TO Requester;
GadgetPtr * = CPOINTER TO Gadget;
BoolInfoPtr * = CPOINTER TO BoolInfo;
PropInfoPtr * = CPOINTER TO PropInfo;
StringInfoPtr * = CPOINTER TO StringInfo;
IntuiTextPtr * = CPOINTER TO IntuiText;
BorderPtr * = CPOINTER TO Border;
ImagePtr * = CPOINTER TO Image;
IntuiMessagePtr * = CPOINTER TO IntuiMessage;
IBoxPtr * = CPOINTER TO IBox;
WindowPtr * = CPOINTER TO Window;
NewWindowPtr * = CPOINTER TO NewWindow;
ExtNewWindowPtr * = CPOINTER TO ExtNewWindow;
DrawInfoPtr * = CPOINTER TO DrawInfo;
ScreenPtr * = CPOINTER TO Screen;
NewScreenPtr * = CPOINTER TO NewScreen;
ExtNewScreenPtr * = CPOINTER TO ExtNewScreen;
PubScreenNodePtr * = CPOINTER TO PubScreenNode;
PreferencesPtr * = CPOINTER TO Preferences;
RememberPtr * = CPOINTER TO Remember;
ColorSpecPtr * = CPOINTER TO ColorSpec;
EasyStructPtr * = CPOINTER TO EasyStruct;
StringExtendPtr * = CPOINTER TO StringExtend;
SGWorkPtr * = CPOINTER TO SGWork;
GadgetInfoPtr * = CPOINTER TO GadgetInfo;
PGXPtr * = CPOINTER TO PGX;
MsgPtr * = CPOINTER TO Msg;
OpSetPtr * = CPOINTER TO OpSet;
OpUpdatePtr * = CPOINTER TO OpUpdate;
OpGetPtr * = CPOINTER TO OpGet;
OpAddTailPtr * = CPOINTER TO OpAddTail;
IClassPtr * = CPOINTER TO IClass;
ObjectPtr * = CPOINTER TO Object;
OpMemberPtr * = CPOINTER TO OpMember;
HitTestPtr * = CPOINTER TO HitTest;
RenderPtr * = CPOINTER TO Render;
InputPtr * = CPOINTER TO Input;
GoInactivePtr * = CPOINTER TO GoInactive;
FrameBoxPtr * = CPOINTER TO FrameBox;
DrawPtr * = CPOINTER TO Draw;
ErasePtr * = CPOINTER TO Erase;
IMHitTestPtr * = CPOINTER TO IMHitTest;
DRIPenArrayPtr* = CPOINTER TO DRIPenArray;
GadSpecialInfoPtr* = CPOINTER TO GadSpecialInfo;
ExtGadgetPtr * = CPOINTER TO ExtGadget;
ScreenBufferPtr * = CPOINTER TO ScreenBuffer;
TabletDataPtr * = CPOINTER TO TabletData;
TabletHookDataPtr * = CPOINTER TO TabletHookData;
LayoutPtr * = CPOINTER TO Layout;
(*
** $VER: intuition.h 38.26 (15.2.93)
**
** Interface definitions for Intuition applications.
*)
(* ======================================================================== *)
(* === Menu =============================================================== *)
(* ======================================================================== *)
TYPE
Menu * = RECORD
nextMenu * : MenuPtr; (* same level *)
leftEdge *, topEdge * : INTEGER; (* position of the select box *)
width *, height * : INTEGER; (* dimensions of the select box *)
flags * : E.WSET; (* see flag definitions below *)
menuName * : E.STRPTR; (* text for this Menu Header *)
firstItem * : MenuItemPtr; (* pointer to first in chain *)
(* these mysteriously-named variables are for internal use only *)
jazzX *, jazzY *, beatX *, beatY * : INTEGER;
END; (* Menu *)
CONST
(* FLAGS SET BY BOTH THE APPLIPROG AND INTUITION *)
menuEnabled * = 0; (* whether or not this menu is enabled *)
(* FLAGS SET BY INTUITION *)
miDrawn * = 8; (* this menu's items are currently drawn *)
(* ======================================================================== *)
(* === MenuItem =========================================================== *)
(* ======================================================================== *)
TYPE
MenuItem * = RECORD
nextItem * : MenuItemPtr; (* pointer to next in chained list *)
leftEdge *, topEdge * : INTEGER; (* position of the select box *)
width *, height * : INTEGER; (* dimensions of the select box *)
flags * : E.WSET; (* see the defines below *)
mutualExclude * : SET; (* set bits mean this item excludes that *)
itemFill * : E.APTR; (* points to Image, IntuiText, or NULL *)
(* when this item is pointed to by the cursor and the items highlight
* mode HIGHIMAGE is selected, this alternate image will be displayed
*)
selectFill * : E.APTR; (* points to Image, IntuiText, or NULL *)
command * : CHAR; (* only if appliprog sets the COMMSEQ flag *)
subItem * : MenuItemPtr; (* if non-zero, points to MenuItem for submenu *)
(* The NextSelect field represents the menu number of next selected
* item (when user has drag-selected several items)
*)
nextSelect * : E.UWORD;
END; (* MenuItem *)
CONST
(* FLAGS SET BY THE APPLIPROG *)
checkIt * = 0; (* set to indicate checkmarkable item *)
itemText * = 1; (* set if textual, clear if graphical item *)
commSeq * = 2; (* set if there's an command sequence *)
menuToggle * = 3; (* set for toggling checks (else mut. exclude) *)
itemEnabled * = 4; (* set if this item is enabled *)
(* these are the SPECIAL HIGHLIGHT FLAG state meanings *)
highFlags * = {6,7}; (* see definitions below for these bits *)
highImage * = {}; (* use the user's "select image" *)
highComp * = {6}; (* highlight by complementing the selectbox *)
highBox * = {7}; (* highlight by "boxing" the selectbox *)
highNone * = {6,7}; (* don't highlight *)
(* FLAGS SET BY BOTH APPLIPROG AND INTUITION *)
checked * = 8; (* state of the checkmark *)
(* FLAGS SET BY INTUITION *)
isDrawn * = 12; (* this item's subs are currently drawn *)
highItem * = 13; (* this item is currently highlighted *)
menuToggled * = 14; (* this item was already toggled *)
(* ======================================================================== *)
(* === Requester ========================================================== *)
(* ======================================================================== *)
TYPE
Requester * = RECORD
olderRequest * : RequesterPtr;
leftEdge *, topEdge * : INTEGER; (* dimensions of the entire box *)
width *, height * : INTEGER; (* dimensions of the entire box *)
relLeft *, relTop * : INTEGER; (* for Pointer relativity offsets *)
reqGadget * : GadgetPtr; (* pointer to a list of Gadgets *)
reqBorder * : BorderPtr; (* the box's border *)
reqText * : IntuiTextPtr; (* the box's text *)
flags * : E.WSET; (* see definitions below *)
(* pen number for back-plane fill before draws *)
backFill * : E.UBYTE;
(* Layer in place of clip rect *)
reqLayer * : G.LayerPtr;
reqPad1 * : ARRAY 32 OF E.UBYTE;
(* If the BitMap plane pointers are non-zero, this tells the system
* that the image comes pre-drawn (if the appliprog wants to define
* its own box, in any shape or size it wants!); this is OK by
* Intuition as long as there's a good correspondence between
* the image and the specified Gadgets
*)
imageBMap * : G.BitMapPtr; (* points to the G.BitMap of PREDRAWN imagery *)
rWindow * : WindowPtr; (* added. points back to Window *)
reqImage * : ImagePtr; (* new for V36: drawn if USEREQIMAGE set *)
reqPad2 * : ARRAY 32 OF E.UBYTE;
END; (* Requester *)
CONST
(* FLAGS SET BY THE APPLIPROG *)
pointRel * = 0;
(* if POINTREL set, TopLeft is relative to pointer
* for DMRequester, relative to window center
* for Request().
*)
preDrawn * = 1;
(* set if Requester.ImageBMap points to predrawn Requester imagery *)
noisyReq * = 2;
(* if you don't want requester to filter input *)
simpleReq * = 4;
(* to use SIMPLEREFRESH layer (recommended) *)
(* New for V36 *)
useReqImage * = 5;
(* render linked list ReqImage after BackFill
* but before gadgets and text
*)
noReqBackFill * = 6;
(* don't bother filling requester with Requester.BackFill pen *)
(* FLAGS SET BY INTUITION *)
reqOffWindow * = 12; (* part of one of the Gadgets was offwindow *)
reqActive * = 13; (* this requester is active *)
sysRequest * = 14; (* (unused) this requester caused by system *)
deferRefresh * = 15; (* this Requester stops a Refresh broadcast *)
(* ======================================================================== *)
(* === Gadget ============================================================= *)
(* ======================================================================== *)
TYPE
GadSpecialInfo * = RECORD END;
Gadget * = RECORD
nextGadget * : GadgetPtr; (* next gadget in the list *)
leftEdge* , topEdge * : INTEGER; (* "hit box" of gadget *)
width* , height * : INTEGER; (* "hit box" of gadget *)
flags * : E.WSET; (* see below for list of defines *)
activation * : E.WSET; (* see below for list of defines *)
gadgetType * : E.WSET; (* see below for defines *)
(* appliprog can specify that the Gadget be rendered as either as Border
* or an Image. This variable points to which (or equals NULL if there's
* nothing to be rendered about this Gadget)
*)
gadgetRender * : E.APTR;
(* appliprog can specify "highlighted" imagery rather than algorithmic
* this can point to either Border or Image data
*)
selectRender * : E.APTR;
gadgetText * : IntuiTextPtr; (* text for this gadget *)
(* MutualExclude, never implemented, is now declared obsolete.
* There are published examples of implementing a more general
* and practical exclusion in your applications.
*
* Starting with V36, this field is used to point to a hook
* for a custom gadget.
*
* Programs using this field for their own processing will
* continue to work, as long as they don't try the
* trick with custom gadgets.
*)
mutualExclude * : SET; (* obsolete *)
(* pointer to a structure of special data required by Proportional,
* String and Integer Gadgets
*)
specialInfo * : GadSpecialInfoPtr;
gadgetID * : E.UWORD; (* user-definable ID field *)
userData * : E.APTR; (* ptr to general purpose User data (ignored by In) *)
END; (* Gadget *)
ExtGadget * = RECORD (Gadget) (* The first fields match struct Gadget exactly *)
(* These fields only exist under V39 and only if gflgExtended is set *)
moreFlags * : SET; (* see gmore* flags below *)
boundsLeftEdge * : INTEGER; (* Bounding extent for gadget, valid *)
boundsTopEdge * : INTEGER; (* only if gmoreBounds is set. The *)
boundsWidth * : INTEGER; (* gflgRelxxx flags affect these *)
boundsHeight * : INTEGER; (* coordinates as well. *)
END;
CONST
(* --- Gadget.Flags values --- *)
(* combinations in these bits describe the highlight technique to be used *)
gflgGadgHighBits * = {0,1};
gflgGadgHComp * = {}; (* Complement the select box *)
gflgGadgHBox * = {0}; (* Draw a box around the image *)
gflgGadgHImage * = {1}; (* Blast in this alternate image *)
gflgGadgHNone * = {0,1}; (* don't highlight *)
gflgGadgImage * = 2; (* set if GadgetRender and SelectRender
* point to an Image structure, clear
* if they point to Border structures
*)
(* combinations in these next two bits specify to which corner the gadget's
* Left & Top coordinates are relative. If relative to Top/Left,
* these are "normal" coordinates (everything is relative to something in
* this universe).
*
* Gadget positions and dimensions are relative to the window or
* requester which contains the gadget
*)
gflgRelBottom * = 3; (* vert. pos. is relative to bottom edge *)
gflgRelRight * = 4; (* horiz. pos. is relative to right edge *)
gflgRelWidth * = 5; (* width is relative to req/window *)
gflgRelHeight * = 6; (* height is relative to req/window *)
(* New for V39: gflgRelSpecial allows custom gadget implementors to
* make gadgets whose position and size depend in an arbitrary way
* on their window's dimensions. The gmLayout method will be invoked
* for such a gadget (or any other grelXxx gadget) at suitable times,
* such as when the window opens or the window's size changes.
*)
gflgRelSpecial * = 14; (* custom gadget has special relativity.
* Gadget box values are absolutes, but
* can be changed via the GM_LAYOUT method.
*)
gflgSelected * = 7; (* you may initialize and look at this *)
(* the gflgDISABLED flag is initialized by you and later set by Intuition
* according to your calls to On/OffGadget(). It specifies whether or not
* this Gadget is currently disabled from being selected
*)
gflgDisabled * = 8;
(* These flags specify the type of text field that Gadget.GadgetText
* points to. In all normal (pre-V36) gadgets which you initialize
* this field should always be zero. Some types of gadget objects
* created from classes will use these fields to keep track of
* types of labels/contents that different from IntuiText, but are
* stashed in GadgetText.
*)
gflgLabelMask * = {12,13};
gflgLabelIText * = {}; (* GadgetText points to IntuiText *)
gflgLabelString * = 12; (* GadgetText points to string *)
gflgLabelImage * = 13; (* GadgetText points to Image (object) *)
(* New for V37: gflgTabCycle *)
gflgTabCycle * = 9; (* (string or custom) gadget participates in
* cycling activation with Tab or Shift-Tab
*)
(* New for V37: gflgStringExtend. We discovered that V34 doesn't properly
* ignore the value we had chosen for the Gadget->Activation flag
* gactStringExtend. NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
* The Gadget->Flags bit gflgStringExtend is provided as a synonym which is
* safe under V34, and equivalent to gactStringExtend under V37.
* (Note that the two flags are not numerically equal)
*)
gflgStringExtend * = 10; (* this String Gadget has StringExtend *)
(* New for V39: gflgImageDisable. This flag is automatically set if
* the custom image of this gadget knows how to do disabled rendering
* (more specifically, if its IA_SupportsDisable attribute is TRUE).
* Intuition uses this to defer the ghosting to the image-class,
* instead of doing it itself (the old compatible way).
* Do not set this flag yourself - Intuition will do it for you.
*)
gflgImageDisable * = 11; (* Gadget's image knows how to do disabled
* rendering
*)
(* New for V39: If set, this bit means that the Gadget is actually
* a struct ExtGadget, with new fields and flags. All V39 boopsi
* gadgets are ExtGadgets. Never ever attempt to read the extended
* fields of a gadget if this flag is not set.
*)
gflgExtended * = 15; (* Gadget is extended *)
(* --- Gadget.Activation flag values --- *)
(* Set gactRelVerify if you want to verify that the pointer was still over
* the gadget when the select button was released. Will cause
* an idcmpGadgetUp message to be sent if so.
*)
gactRelVerify * = 0;
(* the flag gactImmediate, when set, informs the caller that the gadget
* was activated when it was activated. This flag works in conjunction with
* the gactRelVerify flag
*)
gactImmediate * = 1;
(* the flag gactEndGadget, when set, tells the system that this gadget,
* when selected, causes the Requester to be ended. Requesters
* that are ended are erased and unlinked from the system.
*)
gactEndGadget * = 2;
(* the gactFollowMouse flag, when set, specifies that you want to receive
* reports on mouse movements while this gadget is active.
* You probably want to set the gactImmediate flag when using
* gactFollowMouse, since that's the only reasonable way you have of
* learning why Intuition is suddenly sending you a stream of mouse
* movement events. If you don't set gactRelVerify, you'll get at
* least one Mouse Position event.
* Note: boolean FollowMouse gadgets require gactRelVerify to get
* any mouse movement events (this unusual behavior is a compatibility
* hold-over from the old days).
*)
gactFollowMouse * = 3;
(* if any of the Border flags are set in a Gadget that's included in the
* Gadget list when a Window is opened, the corresponding Border will
* be adjusted to make room for the Gadget
*)
gactRightBorder * = 4;
gactLeftBorder * = 5;
gactTopBorder * = 6;
gactBottomBorder * = 7;
gactBorderSniff * = 15; (* neither set nor rely on this bit *)
gactToggleSelect * = 8; (* this bit for toggle-select mode *)
gactBoolExtend * = 13; (* this Boolean Gadget has a BoolInfo *)
(* should properly be in StringInfo, but aren't *)
gactStringLeft * = {}; (* NOTE WELL: that this has value zero *)
gactStringCenter * = 9;
gactStringRight * = 10;
gactLongint * = 11; (* this String Gadget is for Long Ints *)
gactAltKeymap * = 12; (* this String has an alternate keymap *)
gactStringExtend * = 13; (* this String Gadget has StringExtend *)
(* NOTE: NEVER SET gactStringExtend IF YOU
* ARE RUNNING ON LESS THAN V36! SEE
* gflgStringExtend (ABOVE) INSTEAD
*)
gactActiveGadget * = 14; (* this gadget is "active". This flag
* is maintained by Intuition, and you
* cannot count on its value persisting
* while you do something on your program's
* task. It can only be trusted by
* people implementing custom gadgets
*)
(* note 15 is used above (gactBorderSniff)
* all Activation flags defined *)
(* --- GADGET TYPES ------------------------------------------------------- *)
(* These are the Gadget Type definitions for the variable GadgetType
* gadget number type MUST start from one. NO TYPES OF ZERO ALLOWED.
* first comes the mask for Gadget flags reserved for Gadget typing
*)
gtypGadgetType * = {10..15}; (* all Gadget Global Type flags (padded) *)
gtypScrGadget * = {14}; (* 1 * = ScreenGadget, 0 * = WindowGadget *)
gtypGzzGadget * = {13}; (* 1 * = for wflgGimmeZeroZero borders *)
gtypReqGadget * = {12}; (* 1 * = this is a Requester Gadget *)
(* gtypSysGadget means that Intuition ALLOCATED the gadget.
* gtypSysTypeMask is the mask you can apply to tell what type of
* system-gadget it is. The possible types follow.
*)
gtypSysGadget * = {15};
gtypSysTypeMask * = {4..7};
(* These definitions describe system gadgets in V36 and higher: *)
gtypSizing * = {4}; (* Window sizing gadget *)
gtypWDragging * = {5}; (* Window drag bar *)
gtypSDragging * = {4,5}; (* Screen drag bar *)
gtypWDepth * = {6}; (* Window depth gadget *)
gtypSDepth * = {4,6}; (* Screen depth gadget *)
gtypWZoom * = {5,6}; (* Window zoom gadget *)
gtypSUnused * = {4,5,6}; (* Unused screen gadget *)
gtypClose * = {7}; (* Window close gadget *)
(* These definitions describe system gadgets prior to V36: *)
gtypWUpFront * = gtypWDepth; (* Window to-front gadget *)
gtypSUpFront * = gtypSDepth; (* Screen to-front gadget *)
gtypWDownBack * = gtypWZoom; (* Window to-back gadget *)
gtypSDownBack * = gtypSUnused; (* Screen to-back gadget *)
(* gtypGTypeMask is a mask you can apply to tell what class
* of gadget this is. The possible classes follow.
*)
gtypGTypeMask * = {0..2};
gtypBoolGadget * = {0};
gtypGadget0002 * = {1};
gtypPropGadget * = {0,1};
gtypStrGadget * = {2};
gtypCustomGadget * = {0,2};
(* This bit in GadgetType is reserved for undocumented internal use
* by the Gadget Toolkit, and cannot be used nor relied on by
* applications: {8}
*)
(* New for V39. Gadgets which have the gflgExtended flag set are
* actually ExtGadgets, which have more flags. The gmoreXxx
* identifiers describe those flags. For gmoreScrollRaster, see
* important information in the ScrollWindowRaster() autodoc.
* NB: gmoreScrollRaster must be set before the gadget is
* added to a window.
*)
gmoreBounds * = 0; (* ExtGadget has valid Bounds *)
gmoreGadgetHelp * = 1; (* This gadget responds to gadget help *)
gmoreScrollRaster * = 2; (* This (custom) gadget uses ScrollRaster *)
(* ======================================================================== *)
(* === BoolInfo======================================================= *)
(* ======================================================================== *)
(* This is the special data needed by an Extended Boolean Gadget
* Typically this structure will be pointed to by the Gadget field SpecialInfo
*)
TYPE
BoolInfo * = RECORD (GadSpecialInfo)
flags * : E.WSET; (* defined below *)
mask * : E.APTR; (* bit mask for highlighting and selecting
* mask must follow the same rules as an Image
* plane. Its width and height are determined
* by the width and height of the gadget's
* select box. (i.e. Gadget.Width and .Height).
*)
reserved * : E.ULONG; (* set to 0 *)
END; (* BoolInfo *)
CONST
(* set BoolInfo.Flags to this flag bit.
* in the future, additional bits might mean more stuff hanging
* off of BoolInfo.Reserved.
*)
boolMask * = 0; (* extension is for masked gadget *)
(* ======================================================================== *)
(* === PropInfo =========================================================== *)
(* ======================================================================== *)
(* this is the special data required by the proportional Gadget
* typically, this data will be pointed to by the Gadget variable SpecialInfo
*)
TYPE
PropInfo * = RECORD (GadSpecialInfo)
flags * : E.WSET; (* general purpose flag bits (see defines below) *)
(* You initialize the Pot variables before the Gadget is added to
* the system. Then you can look here for the current settings
* any time, even while User is playing with this Gadget. To
* adjust these after the Gadget is added to the System, use
* ModifyProp(); The Pots are the actual proportional settings,
* where a value of zero means zero and a value of MAXPOT means
* that the Gadget is set to its maximum setting.
*)
horizPot * : E.UWORD; (* 16-bit FixedPoint horizontal quantity percentage *)
vertPot * : E.UWORD; (* 16-bit FixedPoint vertical quantity percentage *)
(* the 16-bit FixedPoint Body variables describe what percentage of
* the entire body of stuff referred to by this Gadget is actually
* shown at one time. This is used with the AUTOKNOB routines,
* to adjust the size of the AUTOKNOB according to how much of
* the data can be seen. This is also used to decide how far
* to advance the Pots when User hits the Container of the Gadget.
* For instance, if you were controlling the display of a 5-line
* Window of text with this Gadget, and there was a total of 15
* lines that could be displayed, you would set the VertBody value to
* (MAXBODY / (TotalLines / DisplayLines)) * = MAXBODY / 3.
* Therefore, the AUTOKNOB would fill 1/3 of the container, and
* if User hits the Cotainer outside of the knob, the pot would
* advance 1/3 (plus or minus) If there's no body to show, or
* the total amount of displayable info is less than the display area,
* set the Body variables to the MAX. To adjust these after the
* Gadget is added to the System, use ModifyProp();
*)
horizBody * : E.UWORD; (* horizontal Body *)
vertBody * : E.UWORD; (* vertical Body *)
(* these are the variables that Intuition sets and maintains *)
cWidth * : E.UWORD; (* Container width (with any relativity absoluted) *)
cHeight * : E.UWORD; (* Container height (with any relativity absoluted) *)
hPotRes *, vPotRes * : E.UWORD; (* pot increments *)
leftBorder * : E.UWORD; (* Container borders *)
topBorder * : E.UWORD; (* Container borders *)
END; (* PropInfo *)
CONST
(* --- FLAG BITS ---------------------------------------------------------- *)
autoKnob * = 0; (* this flag sez: gimme that old auto-knob *)
(* NOTE: if you do not use an AUTOKNOB for a proportional gadget,
* you are currently limited to using a single Image of your own
* design: Intuition won't handle a linked list of images as
* a proportional gadget knob.
*)
freeHoriz * = 1; (* if set, the knob can move horizontally *)
freeVert * = 2; (* if set, the knob can move vertically *)
propBorderless * = 3; (* if set, no border will be rendered *)
knobHit * = 8; (* set when this Knob is hit *)
propNewlook * = 4; (* set this if you want to get the new
* V36 look
*)
knobHMin * = 6; (* minimum horizontal size of the Knob *)
knobVMin * = 4; (* minimum vertical size of the Knob *)
maxBody * = 0FFFFH; (* maximum body value *)
maxPot * = 0FFFFH; (* maximum pot value *)
(* ======================================================================== *)
(* === StringInfo ========================================================= *)
(* ======================================================================== *)
(* this is the special data required by the string Gadget
* typically, this data will be pointed to by the Gadget variable SpecialInfo
*)
TYPE
StringInfo * = RECORD (GadSpecialInfo)
(* you initialize these variables, and then Intuition maintains them *)
buffer * : E.STRPTR; (* the buffer containing the start and final string *)
undoBuffer * : E.STRPTR; (* optional buffer for undoing current entry *)
bufferPos * : INTEGER; (* character position in Buffer *)
maxChars * : INTEGER; (* max number of chars in Buffer (including NULL) *)
dispPos * : INTEGER; (* Buffer position of first displayed character *)
(* Intuition initializes and maintains these variables for you *)
undoPos * : INTEGER; (* character position in the undo buffer *)
numChars * : INTEGER; (* number of characters currently in Buffer *)
dispCount * : INTEGER; (* number of whole characters visible in Container *)
cLeft *, cTop * : INTEGER; (* topleft offset of the container *)
(* This unused field is changed to allow extended specification
* of string gadget parameters. It is ignored unless the flag
* gactSTRINGEXTEND is set in the Gadget's Activation field
* or the gflgSTRINGEXTEND flag is set in the Gadget Flags field.
* (See gflgSTRINGEXTEND for an important note)
*)
(* struct Layer *LayerPtr; --- obsolete --- *)
extension * : StringExtendPtr;
(* you can initialize this variable before the gadget is submitted to
* Intuition, and then examine it later to discover what integer
* the user has entered (if the user never plays with the gadget,
* the value will be unchanged from your initial setting)
*)
longInt * : LONGINT;
(* If you want this Gadget to use your own Console keymapping, you
* set the gactALTKEYMAP bit in the Activation flags of the Gadget,
* and then set this variable to point to your keymap. If you don't
* set the gactALTKEYMAP, you'll get the standard ASCII keymapping.
*)
altKeyMap * : KM.KeyMapPtr;
END; (* StringInfo *)
(* ======================================================================== *)
(* === IntuiText ========================================================== *)
(* ======================================================================== *)
(* IntuiText is a series of strings that start with a location
* (always relative to the upper-left corner of something) and then the
* text of the string. The text is null-terminated.
*)
TYPE
IntuiText * = RECORD
frontPen *, backPen * : E.UBYTE; (* the pen numbers for the rendering *)
drawMode * : E.BSET; (* the mode for rendering the text *)
leftEdge * : INTEGER; (* relative start location for the text *)
topEdge * : INTEGER; (* relative start location for the text *)
iTextFont * : G.TextAttrPtr; (* if NULL, you accept the default *)
iText * : E.STRPTR; (* pointer to null-terminated text *)
nextText * : IntuiTextPtr; (* pointer to another IntuiText to render *)
END; (* IntuiText *)
(* ======================================================================== *)
(* === Border ============================================================= *)
(* ======================================================================== *)
(* Data type Border, used for drawing a series of lines which is intended for
* use as a border drawing, but which may, in fact, be used to render any
* arbitrary vector shape.
* The routine DrawBorder sets up the RastPort with the appropriate
* variables, then does a Move to the first coordinate, then does Draws
* to the subsequent coordinates.
* After all the Draws are done, if NextBorder is non-zero we call DrawBorder
* on NextBorder
*)
TYPE
Border * = RECORD
leftEdge *, topEdge * : INTEGER; (* initial offsets from the origin *)
frontPen *, backPen * : E.UBYTE; (* pens numbers for rendering *)
drawMode * : E.BSET; (* mode for rendering *)
count * : SHORTINT; (* number of XY pairs *)
xy * : E.APTR; (* vector coordinate pairs rel to LeftTop *)
nextBorder * : BorderPtr; (* pointer to any other Border too *)
END; (* Border *)
(* ======================================================================== *)
(* === Image ============================================================== *)
(* ======================================================================== *)
(* This is a brief image structure for very simple transfers of
* image data to a RastPort
*)
TYPE
Image * = RECORD
leftEdge * : INTEGER; (* starting offset relative to some origin *)
topEdge * : INTEGER; (* starting offsets relative to some origin *)
width * : INTEGER; (* pixel size (though data is word-aligned) *)
height * : INTEGER;
depth * : INTEGER; (* >= 0, for images you create *)
imageData * : E.APTR; (* pointer to the actual word-aligned bits *)
(* the PlanePick and PlaneOnOff variables work much the same way as the
* equivalent GELS Bob variables. It's a space-saving
* mechanism for image data. Rather than defining the image data
* for every plane of the RastPort, you need define data only
* for the planes that are not entirely zero or one. As you
* define your Imagery, you will often find that most of the planes
* ARE just as color selectors. For instance, if you're designing
* a two-color Gadget to use colors one and three, and the Gadget
* will reside in a five-plane display, bit plane zero of your
* imagery would be all ones, bit plane one would have data that
* describes the imagery, and bit planes two through four would be
* all zeroes. Using these flags avoids wasting all
* that memory in this way: first, you specify which planes you
* want your data to appear in using the PlanePick variable. For
* each bit set in the variable, the next "plane" of your image
* data is blitted to the display. For each bit clear in this
* variable, the corresponding bit in PlaneOnOff is examined.
* If that bit is clear, a "plane" of zeroes will be used.
* If the bit is set, ones will go out instead. So, for our example:
* Gadget.PlanePick * = 02H;
* Gadget.PlaneOnOff * = 01H;
* Note that this also allows for generic Gadgets, like the
* System Gadgets, which will work in any number of bit planes.
* Note also that if you want an Image that is only a filled
* rectangle, you can get this by setting PlanePick to zero
* (pick no planes of data) and set PlaneOnOff to describe the pen
* color of the rectangle.
*
* NOTE: Intuition relies on PlanePick to know how many planes
* of data are found in ImageData. There should be no more
* '1'-bits in PlanePick than there are planes in ImageData.
*)
planePick *, planeOnOff * : E.BSET;
(* if the NextImage variable is not NULL, Intuition presumes that
* it points to another Image structure with another Image to be
* rendered
*)
nextImage * : ImagePtr;
END; (* Image *)
(* ======================================================================== *)
(* === IntuiMessage ======================================================= *)
(* ======================================================================== *)
TYPE
IntuiMessage * = RECORD (E.Message)
(* the Class bits correspond directly with the IDCMP Flags, except for the
* special bit idcmpLONELYMESSAGE (defined below)
*)
class * : SET;
(* the Code field is for special values like MENU number *)
code * : E.UWORD;
(* the Qualifier field is a copy of the current InputEvent's Qualifier *)
qualifier * : E.WSET;
(* IAddress contains particular addresses for Intuition functions, like
* the pointer to the Gadget or the Screen
*)
iAddress * : E.APTR;
(* when getting mouse movement reports, any event you get will have the
* the mouse coordinates in these variables. the coordinates are relative
* to the upper-left corner of your Window (WflgGIMMEZEROZERO
* notwithstanding). If idcmpDELTAMOVE is set, these values will
* be deltas from the last reported position.
*)
mouseX *, mouseY * : INTEGER;
(* the time values are copies of the current system clock time. Micros
* are in units of microseconds, Seconds in seconds.
*)
seconds *, micros * : E.ULONG;
(* the IDCMPWindow variable will always have the address of the Window of
* this IDCMP
*)
idcmpWindow * : WindowPtr;
(* system-use variable *)
specialLink * : IntuiMessagePtr;
END; (* IntuiMessage *)
(* New for V39:
* All IntuiMessages are now slightly extended. The ExtIntuiMessage
* structure has an additional field for tablet data, which is usually
* NULL. If a tablet driver which is sending IE.subClassNewTablet
* events is installed in the system, windows with the WA_TabletMessages
* property set will find that tabletData points to the TabletData
* structure. Applications must first check that this field is non-NULL;
* it will be NULL for certain kinds of message, including mouse activity
* generated from other than the tablet (i.e. the keyboard equivalents
* or the mouse itself).
*
* NEVER EVER examine any extended fields when running under pre-V39!
*
* NOTE: This structure is subject to grow in the future. Making
* assumptions about its size is A BAD IDEA.
*)
ExtIntuiMessage * = RECORD (IntuiMessage)
tabletData * : TabletDataPtr;
END;
CONST
(* --- IDCMP Classes ------------------------------------------------------ *)
(* Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
* Manual for full details on the IDCMP classes.
*)
idcmpSizeVerify * = 0;
idcmpNewSize * = 1;
idcmpRefreshWindow * = 2;
idcmpMouseButtons * = 3;
idcmpMouseMove * = 4;
idcmpGadgetDown * = 5;
idcmpGadgetUp * = 6;
idcmpReqSet * = 7;
idcmpMenuPick * = 8;
idcmpCloseWindow * = 9;
idcmpRawKey * = 10;
idcmpReqVerify * = 11;
idcmpReqClear * = 12;
idcmpMenuVerify * = 13;
idcmpNewPrefs * = 14;
idcmpDiskInserted * = 15;
idcmpDiskRemoved * = 16;
idcmpWBenchMessage * = 17; (* System use only *)
idcmpActiveWindow * = 18;
idcmpInactiveWindow * = 19;
idcmpDeltaMove * = 20;
idcmpVanillaKey * = 21;
idcmpIntuiTicks * = 22;
(* for notifications from "boopsi" gadgets *)
idcmpIdcmpUpdate * = 23; (* new for V36 *)
(* for getting help key report during menu session *)
idcmpMenuHelp * = 24; (* new for V36 *)
(* for notification of any move/size/zoom/change window *)
idcmpChangeWindow * = 25; (* new for V36 *)
idcmpGadgetHelp * = 26; (* new for V39 *)
(* NOTEZ-BIEN: 31 is reserved for internal use *)
(* the IDCMP Flags do not use this special bit, which is cleared when
* Intuition sends its special message to the Task, and set when Intuition
* gets its Message back from the Task. Therefore, I can check here to
* find out fast whether or not this Message is available for me to send
*)
idcmpLonelyMessage * = 31;
(* --- IDCMP Codes -------------------------------------------------------- *)
(* This group of codes is for the idcmpChangeWindow message *)
cwCodeMoveSize * = 00000H; (* Window was moved and/or sized *)
cwCodeDepth * = 00001H; (* Window was depth-arranged (new for V39) *)
(* This group of codes is for the idcmpMenuVerify function *)
menuHot * = 0001H; (* IntuiWants verification or MenuCancel *)
menuCancel * = 0002H; (* Hot Reply of this cancels Menu operation *)
menuWaiting * = 0003H; (* Intuition simply wants a ReplyMsg() ASAP *)
(* These are internal tokens to represent state of verification attempts
* shown here as a clue.
*)
okOk * = menuHot; (* guy didn't care *)
okAbort * = 0004H; (* window rendered question moot *)
okCancel * = menuCancel; (* window sent cancel reply *)
(* This group of codes is for the idcmpWBenchMessage messages *)
wbenchOpen * = 0001H;
wbenchClose * = 0002H;
TYPE
(* A data structure common in V36 Intuition processing *)
IBox * = RECORD
left * : INTEGER;
top * : INTEGER;
width * : INTEGER;
height * : INTEGER;
END; (* IBox *)
(* ======================================================================== *)
(* === Window ============================================================= *)
(* ======================================================================== *)
TYPE
Window * = RECORD
nextWindow * : WindowPtr; (* for the linked list in a screen *)
leftEdge *, topEdge * : INTEGER; (* screen dimensions of window *)
width *, height * : INTEGER; (* screen dimensions of window *)
mouseY *, mouseX * : INTEGER; (* relative to upper-left of window *)
minWidth *, minHeight * : INTEGER; (* minimum sizes *)
maxWidth *, maxHeight * : E.UWORD; (* maximum sizes *)
flags * : SET; (* see below for defines *)
menuStrip * : MenuPtr; (* the strip of Menu headers *)
title * : E.STRPTR; (* the title text for this window *)
firstRequest * : RequesterPtr; (* all active Requesters *)
dmRequest * : RequesterPtr; (* double-click Requester *)
reqCount * : INTEGER; (* count of reqs blocking Window *)
wScreen * : ScreenPtr; (* this Window's Screen *)
rPort * : G.RastPortPtr; (* this Window's very own G.RastPort *)
(* the border variables describe the window border. If you specify
* wflgGIMMEZEROZERO when you open the window, then the upper-left of
* the ClipRect for this window will be upper-left of the G.BitMap (with
* correct offsets when in SuperBitMap mode; you MUST select
* wflgGIMMEZEROZERO when using SuperBitMap). If you don't specify
* ZeroZero, then you save memory (no allocation of RastPort, Layer,
* ClipRect and associated Bitmaps), but you also must offset all your
* writes by BorderTop, BorderLeft and do your own mini-clipping to
* prevent writing over the system gadgets
*)
borderLeft *, borderTop *, borderRight *, borderBottom * : SHORTINT;
borderRPort * : G.RastPortPtr;
(* You supply a linked-list of Gadgets for your Window.
* This list DOES NOT include system gadgets. You get the standard
* window system gadgets by setting flag-bits in the variable Flags (see
* the bit definitions below)
*)
firstGadget * : GadgetPtr;
(* these are for opening/closing the windows *)
parent *, descendant * : WindowPtr;
(* sprite data information for your own Pointer
* set these AFTER you Open the Window by calling SetPointer()
*)
pointer * : E.APTR; (* sprite data *)
ptrHeight * : SHORTINT; (* sprite height (not including sprite padding) *)
ptrWidth * : SHORTINT; (* sprite width (must be less than or equal to 16) *)
xOffset *, yOffset * : SHORTINT; (* sprite offsets *)
(* the IDCMP Flags and User's and Intuition's Message Ports *)
idcmpFlags * : SET; (* User-selected flags *)
userPort *, windowPort * : E.MsgPortPtr;
messageKey * : IntuiMessagePtr;
detailPen *, blockPen * : E.UBYTE; (* for bar/border/gadget rendering *)
(* the CheckMark is a pointer to the imagery that will be used when
* rendering MenuItems of this Window that want to be checkmarked
* if this is equal to NULL, you'll get the default imagery
*)
checkMark * : ImagePtr;
screenTitle * : E.STRPTR; (* if non-null, Screen title when Window is active *)
(* These variables have the mouse coordinates relative to the
* inner-Window of wflgGIMMEZEROZERO Windows. This is compared with the
* MouseX and MouseY variables, which contain the mouse coordinates
* relative to the upper-left corner of the Window, wflgGIMMEZEROZERO
* notwithstanding
*)
gzzMouseX * : INTEGER;
gzzMouseY * : INTEGER;
(* these variables contain the width and height of the inner-Window of
* wflgGIMMEZEROZERO Windows
*)
gzzWidth * : INTEGER;
gzzHeight * : INTEGER;
extData * : E.APTR;
userData * : E.APTR; (* general-purpose pointer to User data extension *)
(** 11/18/85: this pointer keeps a duplicate of what
* Window.RPort->Layer is supposed to be pointing at
*)
wLayer * : G.LayerPtr;
(* NEW 1.2: need to keep track of the font that
* OpenWindow opened, in case user SetFont's into RastPort
*)
iFont * : G.TextFontPtr;
(* (V36) another flag word (the Flags field is used up).
* At present, all flag values are system private.
* Until further notice, you may not change nor use this field.
*)
moreFlags : SET;
(**** Data beyond this point are Intuition Private. DO NOT USE ****)
END; (* Window *)
CONST
(* --- Flags requested at OpenWindow() time by the application --------- *)
wflgSizeGadget * = 0; (* include sizing system-gadget? *)
wflgDragBar * = 1; (* include dragging system-gadget? *)
wflgDepthGadget * = 2; (* include depth arrangement gadget? *)
wflgCloseGadget * = 3; (* include close-box system-gadget? *)
wflgSizeBRight * = 4; (* size gadget uses right border *)
wflgSizeBBottom * = 5; (* size gadget uses bottom border *)
(* --- refresh modes ------------------------------------------------------ *)
(* combinations of the refreshBits select the refresh type *)
wflgRefreshBits * = {6,7};
wflgSmartRefresh * = {};
wflgSimpleRefresh * = 6;
wflgSuperBitmap * = 7;
wflgOtherRefresh * = {6,7};
wflgBackdrop * = 8; (* this is a backdrop window *)
wflgReportMouse * = 9; (* to hear about every mouse move *)
wflgGimmeZeroZero * = 10; (* a GimmeZeroZero window *)
wflgBorderless * = 11; (* to get a Window sans border *)
wflgActivate * = 12; (* when Window opens, it's Active *)
(* --- Other User Flags --------------------------------------------------- *)
wflgRMBTrap * = 16; (* Catch RMB events for your own *)
wflgNoCareRefresh * = 17; (* not to be bothered with REFRESH *)
(* - V36 new Flags which the programmer may specify in NewWindow.Flags *)
wflgNwExtended * = 18; (* extension data provided *)
(* see struct ExtNewWindow *)
(* - V39 new Flags which the programmer may specify in NewWindow.Flags *)
wflgNewLookMenus * = 21; (* window has NewLook menus *)
(* These flags are set only by Intuition. YOU MAY NOT SET THEM YOURSELF! *)
wflgWindowActive * = 13; (* this window is the active one *)
wflgInRequest * = 14; (* this window is in request mode *)
wflgMenuState * = 15; (* Window is active with Menus on *)
wflgWindowRefresh * = 24; (* Window is currently refreshing *)
wflgWbenchWindow * = 25; (* WorkBench tool ONLY Window *)
wflgWindowTicked * = 26; (* only one timer tick at a time *)
(* V36 and higher flags to be set only by Intuition: *)
wflgVisitor * = 27; (* visitor window *)
wflgZoomed * = 28; (* identifies "zoom state" *)
wflgHasZoom * = 29; (* windowhas a zoom gadget *)
(* --- Other Window Values ---------------------------------------------- *)
defaultMouseQueue * = 5; (* no more mouse messages *)
(* --- see struct IntuiMessage for the IDCMP Flag definitions ------------- *)
(* ======================================================================== *)
(* === NewWindow ========================================================== *)
(* ======================================================================== *)
(*
* Note that the new extension fields have been removed. Use ExtNewWindow
* structure below to make use of these fields
*)
TYPE
NewWindow * = RECORD
leftEdge *, topEdge * : INTEGER; (* screen dimensions of window *)
width *, height * : INTEGER; (* screen dimensions of window *)
detailPen *, blockPen * : E.UBYTE; (* for bar/border/gadget rendering *)
idcmpFlags * : SET; (* User-selected IDCMP flags *)
flags * : SET; (* see Window struct for defines *)
(* You supply a linked-list of Gadgets for your Window.
* This list DOES NOT include system Gadgets. You get the standard
* system Window Gadgets by setting flag-bits in the variable Flags (see
* the bit definitions under the Window structure definition)
*)
firstGadget * : GadgetPtr;
(* the CheckMark is a pointer to the imagery that will be used when
* rendering MenuItems of this Window that want to be checkmarked
* if this is equal to NULL, you'll get the default imagery
*)
checkMark * : ImagePtr;
title * : E.STRPTR; (* the title text for this window *)
(* the Screen pointer is used only if you've defined a CUSTOMSCREEN and
* want this Window to open in it. If so, you pass the address of the
* Custom Screen structure in this variable. Otherwise, this variable
* is ignored and doesn't have to be initialized.
*)
screen * : ScreenPtr;
(* wflgSuperBITMAP Window? If so, put the address of your G.BitMap
* structure in this variable. If not, this variable is ignored and
* doesn't have to be initialized
*)
bitMap * : G.BitMapPtr;
(* the values describe the minimum and maximum sizes of your Windows.
* these matter only if you've chosen the wflgSIZEGADGET option,
* which means that you want to let the User to change the size of
* this Window. You describe the minimum and maximum sizes that the
* Window can grow by setting these variables. You can initialize
* any one these to zero, which will mean that you want to duplicate
* the setting for that dimension (if MinWidth == 0, MinWidth will be
* set to the opening Width of the Window).
* You can change these settings later using SetWindowLimits().
* If you haven't asked for a SIZING Gadget, you don't have to
* initialize any of these variables.
*)
minWidth *, minHeight * : INTEGER; (* minimums *)
maxWidth *, maxHeight * : E.UWORD; (* maximums *)
(* the type variable describes the Screen in which you want this Window to
* open. The type value can either be CUSTOMSCREEN or one of the
* system standard Screen Types such as WBENCHSCREEN. See the
* type definitions under the Screen structure.
*)
type * : E.WSET;
END; (* NewWindow *)
(* The following structure is the future NewWindow. Compatibility
* issues require that the size of NewWindow not change.
* Data in the common part (NewWindow) indicates the the extension
* fields are being used.
* NOTE WELL: This structure may be subject to future extension.
* Writing code depending on its size is not allowed.
*)
ExtNewWindow * = RECORD (NewWindow)
(* ------------------------------------------------------- *
* extensions for V36
* if the NewWindow Flag value wflgNwEXTENDED is set, then
* this field is assumed to point to an array ( or chain of arrays)
* of TagItem structures. See also ExtNewScreen for another
* use of TagItems to pass optional data.
*
* see below for tag values and the corresponding data.
*)
extension * : U.TagListPtr;
END; (* ExtNewWindow *)
CONST
(*
* The TagItem ID's (tiTag values) for OpenWindowTagList() follow.
* They are values in a TagItem array passed as extension/replacement
* values for the data in NewWindow. OpenWindowTagList() can actually
* work well with a NULL NewWindow pointer.
*)
waDummy * = U.tagUser + 99; (* 80000063H *)
(* these tags simply override NewWindow parameters *)
waLeft * = waDummy + 01H;
waTop * = waDummy + 02H;
waWidth * = waDummy + 03H;
waHeight * = waDummy + 04H;
waDetailPen * = waDummy + 05H;
waBlockPen * = waDummy + 06H;
waIDCMP * = waDummy + 07H;
(* "bulk" initialization of NewWindow.Flags *)
waFlags * = waDummy + 08H;
waGadgets * = waDummy + 09H;
waCheckmark * = waDummy + 0AH;
waTitle * = waDummy + 0BH;
(* means you don't have to call SetWindowTitles
* after you open your window
*)
waScreenTitle * = waDummy + 0CH;
waCustomScreen * = waDummy + 0DH;
waSuperBitMap * = waDummy + 0EH;
(* also implies wflgSuperBITMAP property *)
waMinWidth * = waDummy + 0FH;
waMinHeight * = waDummy + 10H;
waMaxWidth * = waDummy + 11H;
waMaxHeight * = waDummy + 12H;
(* The following are specifications for new features *)
waInnerWidth * = waDummy + 13H;
waInnerHeight * = waDummy + 14H;
(* You can specify the dimensions of the interior
* region of your window, independent of what
* the border widths will be. You probably want
* to also specify waAutoAdjust to allow
* Intuition to move your window or even
* shrink it so that it is completely on screen.
*)
waPubScreenName * = waDummy + 15H;
(* declares that you want the window to open as
* a visitor on the public screen whose name is
* pointed to by (E.UBYTE * ) tiData
*)
waPubScreen * = waDummy + 16H;
(* open as a visitor window on the public screen
* whose address is in (struct Screen * ) tiData.
* To ensure that this screen remains open, you
* should either be the screen's owner, have a
* window open on the screen, or use LockPubScreen().
*)
waPubScreenFallBack * = waDummy + 17H;
(* A Boolean, specifies whether a visitor window
* should "fall back" to the default public screen
* (or Workbench) if the named public screen isn't
* available
*)
waWindowName * = waDummy + 18H;
(* not implemented *)
waColors * = waDummy + 19H;
(* a ColorSpec array for colors to be set
* when this window is active. This is not
* implemented, and may not be, since the default
* values to restore would be hard to track.
* We'd like to at least support per-window colors
* for the mouse pointer sprite.
*)
waZoom * = waDummy + 1AH;
(* tiData points to an array of four INTEGER's,
* the initial Left/Top/Width/Height values of
* the "alternate" zoom position/dimensions.
* It also specifies that you want a Zoom gadget
* for your window, whether or not you have a
* sizing gadget.
*)
waMouseQueue * = waDummy + 1BH;
(* tiData contains initial value for the mouse
* message backlog limit for this window.
*)
waBackFill * = waDummy + 1CH;
(* unimplemented at present: provides a "backfill
* hook" for your window's layer.
*)
waRptQueue * = waDummy + 1DH;
(* initial value of repeat key backlog limit *)
(* These Boolean tag items are alternatives to the NewWindow.Flags
* boolean flags with similar names.
*)
waSizeGadget * = waDummy + 1EH;
waDragBar * = waDummy + 1FH;
waDepthGadget * = waDummy + 20H;
waCloseGadget * = waDummy + 21H;
waBackdrop * = waDummy + 22H;
waReportMouse * = waDummy + 23H;
waNoCareRefresh * = waDummy + 24H;
waBorderless * = waDummy + 25H;
waActivate * = waDummy + 26H;
waRMBTrap * = waDummy + 27H;
waWBenchWindow * = waDummy + 28H; (* PRIVATE!! *)
waSimpleRefresh * = waDummy + 29H;
(* only specify if TRUE *)
waSmartRefresh * = waDummy + 2AH;
(* only specify if TRUE *)
waSizeBRight * = waDummy + 2BH;
waSizeBBottom * = waDummy + 2CH;
(* New Boolean properties *)
waAutoAdjust * = waDummy + 2DH;
(* shift or squeeze the window's position and
* dimensions to fit it on screen.
*)
waGimmeZeroZero * = waDummy + 2EH;
(* equiv. to NewWindow.Flags wflgGIMMEZEROZERO *)
(* New for V37: waMenuHelp (ignored by V36) *)
waMenuHelp * = waDummy + 2FH;
(* Enables idcmpMENUHELP: Pressing HELP during menus
* will return idcmpMENUHELP message.
*)
(* New for V39: (ignored by V37 and earlier) *)
waNewLookMenus * = waDummy + 30H;
(* Set to TRUE if you want NewLook menus *)
waAmigaKey * = waDummy + 31H;
(* Pointer to image for Amiga-key equiv in menus *)
waNotifyDepth * = waDummy + 32H;
(* Requests idcmpChangeWindow message when
* window is depth arranged
* (imsg->Code = cwCodeDepth)
*)
(* waDummy + 33H is obsolete *)
waPointer * = waDummy + 34H;
(* Allows you to specify a custom pointer
* for your window. ti_Data points to a
* pointer object you obtained via
* "pointerclass". NULL signifies the
* default pointer.
* This tag may be passed to OpenWindowTags()
* or SetWindowPointer().
*)
waBusyPointer * = waDummy + 35H;
(* ti_Data is boolean. Set to TRUE to
* request the standard busy pointer.
* This tag may be passed to OpenWindowTags()
* or SetWindowPointer().
*)
waPointerDelay * = waDummy + 36H;
(* ti_Data is boolean. Set to TRUE to
* request that the changing of the
* pointer be slightly delayed. The change
* will be called off if you call NewSetPointer()
* before the delay expires. This allows
* you to post a busy-pointer even if you think
* the busy-time may be very short, without
* fear of a flashing pointer.
* This tag may be passed to OpenWindowTags()
* or SetWindowPointer().
*)
waTabletMessages * = waDummy + 37H;
(* ti_Data is a boolean. Set to TRUE to
* request that tablet information be included
* in IntuiMessages sent to your window.
* Requires that something (i.e. a tablet driver)
* feed IE.subClassNewTablet InputEvents into
* the system. For a pointer to the TabletData,
* examine the ExtIntuiMessage.tabletData
* field. It is UNSAFE to check this field
* when running on pre-V39 systems. It's always
* safe to check this field under V39 and up,
* though it may be NULL.
*)
waHelpGroup * = waDummy + 38H;
(* When the active window has gadget help enabled,
* other windows of the same HelpGroup number
* will also get GadgetHelp. This allows GadgetHelp
* to work for multi-windowed applications.
* Use GetGroupID() to get an ID number. Pass
* this number as ti_Data to all your windows.
* See also the HelpControl() function.
*)
waHelpGroupWindow * = waDummy + 39H;
(* When the active window has gadget help enabled,
* other windows of the same HelpGroup will also get
* GadgetHelp. This allows GadgetHelp to work
* for multi-windowed applications. As an alternative
* to WA_HelpGroup, you can pass a pointer to any
* other window of the same group to join its help
* group. Defaults to NULL, which has no effect.
* See also the HelpControl() function.
*)
(* HelpControl() flags:
*
* hcGadgetHelp - Set this flag to enable Gadget-Help for one or more
* windows.
*)
hcGadgetHelp * = 1;
(*
** $VER: screens.h 38.25 (15.2.93)
**
** The Screen and NewScreen structures and attributes
*)
(* ======================================================================== *)
(* === DrawInfo ========================================================= *)
(* ======================================================================== *)
(* This is a packet of information for graphics rendering. It originates
* with a Screen, and is gotten using GetScreenDrawInfo( screen );
*)
CONST
(* You can use the Intuition version number to tell which fields are
* present in this structure.
*
* driVersion of 1 corresponds to V37 release.
* driVersion of 2 corresponds to V39, and includes three new pens
* and the checkMark and amigaKey fields.
*
* Note that sometimes applications need to create their own DrawInfo
* structures, in which case the driVersion won't correspond exactly
* to the OS version!!!
*)
driVersion * = 2;
TYPE
DrawInfo * = RECORD
version * : E.UWORD; (* will be driVersion *)
numPens * : E.UWORD; (* guaranteed to be >= numDrIPens *)
pens * : DRIPenArrayPtr; (* pointer to pen array *)
font * : G.TextFontPtr; (* screen default font *)
depth * : E.UWORD; (* (initial) depth of screen bitmap *)
resolution * : G.Point; (* from DisplayInfo database for initial display mode *)
flags * : SET; (* defined below *)
(* New for V39: checkMark, amigaKey. *)
checkMark * : ImagePtr; (* pointer to scaled checkmark image
* Will be NULL if DRI_VERSION < 2
*)
amigaKey * : ImagePtr; (* pointer to scaled Amiga-key image
* Will be NULL if DRI_VERSION < 2
*)
reserved * : ARRAY 5 OF E.ULONG; (* avoid recompilation ;^) *)
END; (* DrawInfo *)
CONST
driNewLook * = 0; (* specified saPens, full treatment *)
(* rendering pen number indexes into DrawInfo.driPens[] *)
detailPen * = 0; (* compatible Intuition rendering pens *)
blockPen * = 1; (* compatible Intuition rendering pens *)
textPen * = 2; (* text on background *)
shinePen * = 3; (* bright edge on 3D objects *)
shadowPen * = 4; (* dark edge on 3D objects *)
fillPen * = 5; (* active-window/selected-gadget fill *)
fillTextPen * = 6; (* text over FILLPEN *)
backGroundPen * = 7; (* always color 0 *)
highlightTextPen * = 8; (* special color text, on background *)
(* New for V39, only present if driVersion >= 2: *)
barDetailPen * = 9; (* text/detail in screen-bar/menus *)
barBlockPen * = 10; (* screen-bar/menus fill *)
barTrimPen * = 11; (* trim under screen-bar *)
numDRIPens * = 9;
(* New for V39: It is sometimes useful to specify that a pen value
* is to be the complement of color zero to three. The "magic" numbers
* serve that purpose:
*)
penC3 * = 0FEFCH; (* Complement of color 3 *)
penC2 * = 0FEFDH; (* Complement of color 2 *)
penC1 * = 0FEFEH; (* Complement of color 1 *)
penC0 * = 0FEFFH; (* Complement of color 0 *)
TYPE
DRIPenArray * = ARRAY numDRIPens OF E.UWORD;
(* ======================================================================== *)
(* === Screen ============================================================= *)
(* ======================================================================== *)
(* VERY IMPORTANT NOTE ABOUT Screen->BitMap. In the future, bitmaps
* will need to grow. The embedded instance of a bitmap in the screen
* will no longer be large enough to hold the whole description of
* the bitmap.
*
* YOU ARE STRONGLY URGED to use Screen.rastPort.bitMap in place of
* SYS.ADR (Screen.bitMap) whenever and whereever possible.
*)
TYPE
Screen * = RECORD
nextScreen * : ScreenPtr; (* linked list of screens *)
firstWindow * : WindowPtr; (* linked list Screen's Windows *)
leftEdge *, topEdge * : INTEGER; (* parameters of the screen *)
width *, height * : INTEGER; (* parameters of the screen *)
mouseY *, mouseX * : INTEGER; (* position relative to upper-left *)
flags * : E.WSET; (* see definitions below *)
title * : E.STRPTR; (* null-terminated Title text *)
defaultTitle * : E.STRPTR; (* for Windows without ScreenTitle *)
(* Bar sizes for this Screen and all Window's in this Screen *)
(* Note that BarHeight is one less than the actual menu bar
* height. We're going to keep this in V36 for compatibility,
* although V36 artwork might use that extra pixel
*
* Also, the title bar height of a window is calculated from the
* screen's WBorTop field, plus the font height, plus one.
*)
barHeight *,
barVBorder *, barHBorder *,
menuVBorder *, menuHBorder * : SHORTINT;
wBorTop *, wBorLeft *, wBorRight *, wBorBottom * : SHORTINT;
font * : G.TextAttrPtr; (* this screen's default font *)
(* the display data structures for this Screen *)
viewPort * : G.ViewPort; (* describing the Screen's display *)
rastPort * : G.RastPort; (* describing Screen rendering *)
bitMap * : G.BitMap; (* extra copy of RastPort G.BitMap *)
layerInfo * : G.LayerInfo; (* each screen gets a LayerInfo *)
(* Only system gadgets may be attached to a screen.
* You get the standard system Screen Gadgets automatically
*)
firstGadget * : GadgetPtr;
detailPen *, blockPen * : E.UBYTE; (* for bar/border/gadget rendering *)
(* the following variable(s) are maintained by Intuition to support the
* DisplayBeep() color flashing technique
*)
saveColor0 * : E.UWORD;
(* This layer is for the Screen and Menu bars *)
barLayer * : G.LayerPtr;
extData * : E.APTR;
userData * : E.APTR; (* general-purpose pointer to User data extension *)
(**** Data below this point are SYSTEM PRIVATE ****)
END; (* Screen *)
CONST
(* --- FLAGS SET BY INTUITION --------------------------------------------- *)
(* The SCREENTYPE bits are reserved for describing various Screen types
* available under Intuition.
*)
screenType * = {0..3}; (* all the screens types available *)
(* --- the definitions for the Screen Type ------------------------------- *)
wbenchScreen * = 0; (* identifies the Workbench screen *)
publicScreen * = 1; (* public shared (custom) screen *)
customScreen * = {0..3}; (* original custom screens *)
showTitle * = 4; (* this gets set by a call to ShowTitle() *)
beeping * = 5; (* set when Screen is beeping (private) *)
customBitmap * = 6; (* if you are supplying your own G.BitMap *)
screenBehind * = 7; (* if you want your screen to open behind
* already open screens
*)
screenQuiet * = 8; (* if you do not want Intuition to render
* into your screen (gadgets, title)
*)
screenHires * = 9; (* do not use lowres gadgets (private) *)
nsExtended * = 12; (* ExtNewScreen.Extension is valid *)
(* V36 applications can use OpenScreenTagList() instead of nsEXTENDED *)
autoScroll * = 14; (* screen is to autoscoll *)
(* New for V39: *)
penShared * = 10; (* Screen opener set {saSharePens,TRUE} *)
stdScreenHeight * = -1; (* supply in NewScreen.Height *)
stdScreenWidth * = -1; (* supply in NewScreen.Width *)
(*
* Screen attribute tag ID's. These are used in the tiTag field of
* TagItem arrays passed to OpenScreenTagList() (or in the
* ExtNewScreen.Extension field).
*)
(* Screen attribute tags. Please use these versions, not those in
* iobsolete.h.
*)
saDummy * = U.tagUser + 32;
(*
* these items specify items equivalent to fields in NewScreen
*)
saLeft * = saDummy + 0001H;
saTop * = saDummy + 0002H;
saWidth * = saDummy + 0003H;
saHeight * = saDummy + 0004H;
(* traditional screen positions and dimensions *)
saDepth * = saDummy + 0005H;
(* screen bitmap depth *)
saDetailPen * = saDummy + 0006H;
(* serves as default for windows, too *)
saBlockPen * = saDummy + 0007H;
saTitle * = saDummy + 0008H;
(* default screen title *)
saColors * = saDummy + 0009H;
(* tiData is an array of struct ColorSpec,
* terminated by ColorIndex * = -1. Specifies
* initial screen palette colors.
*)
saErrorCode * = saDummy + 000AH;
(* data points to LONGINT error code (values below)*)
saFont * = saDummy + 000BH;
(* equiv. to NewScreen.Font *)
saSysFont * = saDummy + 000CH;
(* Selects one of the preferences system fonts:
* 0 - old DefaultFont, fixed-width
* 1 - WB Screen preferred font
*)
saType * = saDummy + 000DH;
(* data is publicScreen or customScreen. For other
* fields of NewScreen.type, see individual tags,
* eg. saBehind, saQuiet.
*)
saBitMap * = saDummy + 000EH;
(* tiData is pointer to custom G.BitMap. This
* implies type of customBitmap
*)
saPubName * = saDummy + 000FH;
(* presence of this tag means that the screen
* is to be a public screen. Please specify
* BEFORE the two tags below
*)
saPubSig * = saDummy + 0010H;
saPubTask * = saDummy + 0011H;
(* Task ID and signal for being notified that
* the last window has closed on a public screen.
*)
saDisplayID * = saDummy + 0012H;
(* data is new extended display ID from
* <graphics/displayinfo.h> (V37) or from
* <graphics/modeid.h> (V39 and up)
*)
saDClip * = saDummy + 0013H;
(* data points to a rectangle which defines
* screen display clip region
*)
saOverscan * = saDummy + 0014H;
(* Set to one of the oscan*
* specifiers below to get a system standard
* overscan region for your display clip,
* screen dimensions (unless otherwise specified),
* and automatically centered position (partial
* support only so far).
* If you use this, you shouldn't specify
* saDClip. saOverscan is for "standard"
* overscan dimensions, saDClip is for
* your custom numeric specifications.
*)
saObsolete1 * = saDummy + 0015H;
(* obsolete sMonitorName *)
(** booleans **)
saShowTitle * = saDummy + 0016H;
(* boolean equivalent to flag showTitle *)
saBehind * = saDummy + 0017H;
(* boolean equivalent to flag screenBehind *)
saQuiet * = saDummy + 0018H;
(* boolean equivalent to flag screenQuiet *)
saAutoScroll * = saDummy + 0019H;
(* boolean equivalent to flag autoScroll *)
saPens * = saDummy + 001AH;
(* pointer to ~0 terminated E.UWORD array, as
* found in struct DrawInfo
*)
saFullPalette * = saDummy + 001BH;
(* boolean: initialize color table to entire
* preferences palette (32 for V36), rather
* than compatible pens 0-3, 17-19, with
* remaining palette as returned by GetColorMap()
*)
saColorMapEntries * = saDummy + 001CH;
(* New for V39:
* Allows you to override the number of entries
* in the ColorMap for your screen. Intuition
* normally allocates (1<<depth) or 32, whichever
* is more, but you may require even more if you
* use certain V39 graphics.library features
* (eg. palette-banking).
*)
saParent * = saDummy + 001DH;
(* New for V39:
* ti_Data is a pointer to a "parent" screen to
* attach this one to. Attached screens slide
* and depth-arrange together.
*)
saDraggable * = saDummy + 001EH;
(* New for V39:
* Boolean tag allowing non-draggable screens.
* Do not use without good reason!
* (Defaults to TRUE).
*)
saExclusive * = saDummy + 001FH;
(* New for V39:
* Boolean tag allowing screens that won't share
* the display. Use sparingly! Starting with 3.01,
* attached screens may be SA_Exclusive. Setting
* SA_Exclusive for each screen will produce an
* exclusive family. (Defaults to FALSE).
*)
saSharePens * = saDummy + 0020H;
(* New for V39:
* For those pens in the screen's DrawInfo->dri_Pens,
* Intuition obtains them in shared mode (see
* graphics.library/ObtainPen()). For compatibility,
* Intuition obtains the other pens of a public
* screen as PEN_EXCLUSIVE. Screens that wish to
* manage the pens themselves should generally set
* this tag to TRUE. This instructs Intuition to
* leave the other pens unallocated.
*)
saBackFill * = saDummy + 0021H;
(* New for V39:
* provides a "backfill hook" for your screen's
* Layer_Info.
* See layers.library/InstallLayerInfoHook()
*)
saInterleaved * = saDummy + 0022H;
(* New for V39:
* Boolean tag requesting that the bitmap
* allocated for you be interleaved.
* (Defaults to FALSE).
*)
saColors32 * = saDummy + 0023H;
(* New for V39:
* Tag to set the screen's initial palette colors
* at 32 bits-per-gun. ti_Data is a pointer
* to a table to be passed to the
* graphics.library/LoadRGB32() function.
* This format supports both runs of color
* registers and sparse registers. See the
* autodoc for that function for full details.
* Any color set here has precedence over
* the same register set by SA_Colors.
*)
saVideoControl * = saDummy + 0024H;
(* New for V39:
* ti_Data is a pointer to a taglist that Intuition
* will pass to graphics.library/VideoControl(),
* upon opening the screen.
*)
saFrontChild * = saDummy + 0025H;
(* New for V39:
* ti_Data is a pointer to an already open screen
* that is to be the child of the screen being
* opened. The child screen will be moved to the
* front of its family.
*)
saBackChild * = saDummy + 0026H;
(* New for V39:
* ti_Data is a pointer to an already open screen
* that is to be the child of the screen being
* opened. The child screen will be moved to the
* back of its family.
*)
saLikeWorkbench * = saDummy + 0027H;
(* New for V39:
* Set ti_Data to 1 to request a screen which
* is just like the Workbench. This gives
* you the same screen mode, depth, size,
* colors, etc., as the Workbench screen.
*)
saReserved * = saDummy + 0028H;
(* Reserved for private Intuition use *)
saMinimizeISG * = saDummy + 0029H;
(* New for V40:
* For compatibility, Intuition always ensures
* that the inter-screen gap is at least three
* non-interlaced lines. If your application
* would look best with the smallest possible
* inter-screen gap, set ti_Data to TRUE.
* If you use the new graphics VideoControl()
* VC_NoColorPaletteLoad tag for your screen's
* ViewPort, you should also set this tag.
*)
(* this is an obsolete tag included only for compatibility with V35
* interim release for the A2024 and Viking monitors
*)
nstagExtVPMode * = U.tagUser + 1;
(* OpenScreen error codes, which are returned in the (optional) LONGINT
* pointed to by tiData for the saErrorCode tag item
*)
osErrNoMonitor * = 1; (* named monitor spec not available *)
osErrNoChips * = 2; (* you need newer custom chips *)
osErrNoMem * = 3; (* couldn't get normal memory *)
osErrNoChipMem * = 4; (* couldn't get chipmem *)
osErrPubNotUnique * = 5; (* public screen name already used *)
osErrUnknownMode * = 6; (* don't recognize mode asked for *)
osErrTooDeep * = 7; (* Screen deeper than HW supports *)
osErrAttachFail * = 8; (* Failed to attach screens *)
osErrNotAvailable * = 9; (* Mode not available for other reason *)
(* ======================================================================== *)
(* === NewScreen ========================================================== *)
(* ======================================================================== *)
(* note: to use the Extended field, you must use the
* new ExtNewScreen structure, below
*)
TYPE
NewScreen * = RECORD
leftEdge *, topEdge *,
width *, height *, depth * : INTEGER; (* screen dimensions *)
detailPen *, blockPen * : E.UBYTE; (* for bar/border/gadget rendering *)
viewModes * : E.WSET; (* the Modes for the ViewPort (and View) *)
type * : E.WSET; (* the Screen type (see defines above) *)
font * : G.TextAttrPtr; (* this Screen's default text attributes *)
defaultTitle * : E.STRPTR; (* the default title for this Screen *)
gadgets * : GadgetPtr; (* UNUSED: Leave this NULL *)
(* if you are opening a CUSTOMSCREEN and already have a G.BitMap
* that you want used for your Screen, you set the flags CUSTOMBITMAP in
* the Type field and you set this variable to point to your G.BitMap
* structure. The structure will be copied into your Screen structure,
* after which you may discard your own G.BitMap if you want
*)
customBitMap * : G.BitMapPtr;
END; (* NewScreen *)
(*
* For compatibility reasons, we need a new structure for extending
* NewScreen. Use this structure is you need to use the new Extension
* field.
*
* NOTE: V36-specific applications should use the
* OpenScreenTagList( newscreen, tags ) version of OpenScreen().
* Applications that want to be V34-compatible as well may safely use the
* ExtNewScreen structure. Its tags will be ignored by V34 Intuition.
*
*)
ExtNewScreen * = RECORD (NewScreen)
extension * : U.TagListPtr;
(* more specification data, scanned if
* nsExtended is set in NewScreen.type
*)
END; (* ExtNewScreen *)
CONST
(* === Overscan Types === *)
oscanText * = 1; (* entirely visible *)
oscanStandard * = 2; (* just past edges *)
oscanMax * = 3; (* as much as possible *)
oscanVideo * = 4; (* even more than is possible *)
(* === Public Shared Screen Node === *)
(* This is the representative of a public shared screen.
* This is an internal data structure, but some functions may
* present a copy of it to the calling application. In that case,
* be aware that the screen pointer of the structure can NOT be
* used safely, since there is no guarantee that the referenced
* screen will remain open and a valid data structure.
*
* Never change one of these.
*)
TYPE
PubScreenNode * = RECORD (E.Node) (* name is screen name *)
screen : ScreenPtr;
flags - : E.WSET; (* below *)
size - : INTEGER; (* includes name buffer *)
visitorCount - : INTEGER; (* how many visitor windows *)
sigTask - : E.TaskPtr; (* who to signal when visitors gone *)
sigBit - : E.UBYTE; (* which signal *)
END; (* PubScreenNode *)
CONST
psnPrivate * = 0;
(* NOTE: Due to a bug in NextPubScreen(), make sure your buffer
* actually has maxPubScreenName+1 characters in it!
*)
maxPubScreenName * = 139; (* names no longer, please *)
(* pub screen modes *)
shanghai * = 0; (* put workbench windows on pub screen *)
popPubScreen * = 1; (* pop pub screen to front when visitor opens *)
(* New for V39: Intuition has new screen depth-arrangement and movement
* functions called ScreenDepth() and ScreenPosition() respectively.
* These functions permit the old behavior of ScreenToFront(),
* ScreenToBack(), and MoveScreen(). ScreenDepth() also allows
* independent depth control of attached screens. ScreenPosition()
* optionally allows positioning screens even though they were opened
* {saDraggable,FALSE}.
*)
(* For ScreenDepth(), specify one of sDepthToFront or sDepthToBack,
* and optionally also sDepthInFamily.
*
* NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
* sDepthInFamily. Commodities, "input helper" programs,
* or any other program that did not open a screen should never
* use that flag. (Note that this is a style-behavior
* requirement; there is no technical requirement that the
* task calling this function need be the task which opened
* the screen).
*)
sDepthToFront * = 0; (* Bring screen to front *)
sDepthToBack * = 1; (* Send screen to back *)
sDepthInFamily * = 2; (* Move an attached screen with
* respect to other screens of
* its family
*)
(* Here's an obsolete name equivalent to sDepthInFamily: *)
sDepthChildOnly * = sDepthInFamily;
(* For ScreenPosition(), specify one of sPosRelative, sPosAbsolute,
* or sPosMakeVisible to describe the kind of screen positioning you
* wish to perform:
*
* sPosRelative: The x1 and y1 parameters to ScreenPosition() describe
* the offset in coordinates you wish to move the screen by.
* sPosAbsolute: The x1 and y1 parameters to ScreenPosition() describe
* the absolute coordinates you wish to move the screen to.
* sPosMakeVisible: (x1,y1)-(x2,y2) describes a rectangle on the
* screen which you would like autoscrolled into view.
*
* You may additionally set sPosForceDrag along with any of the
* above. Set this if you wish to reposition an {saDraggable,FALSE}
* screen that you opened.
*
* NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
* sPosForceDrag. Commodities, "input helper" programs,
* or any other program that did not open a screen should never
* use that flag.
*)
sPosRelative * = 0; (* Coordinates are relative *)
sPosAbsolute * = 1; (* Coordinates are expressed as
* absolutes, not relatives.
*)
sPosMakeVisible * = 2; (* Coordinates describe a box on
* the screen you wish to be
* made visible by autoscrolling
*)
sPosForceDrag * = 4; (* Move non-draggable screen *)
(* New for V39: Intuition supports double-buffering in screens,
* with friendly interaction with menus and certain gadgets.
* For each buffer, you need to get one of these structures
* from the AllocScreenBuffer() call. Never allocate your
* own ScreenBuffer structures!
*
* The sbDBufInfo field is for your use. See the graphics.library
* AllocDBufInfo() autodoc for details.
*)
TYPE
ScreenBuffer * = RECORD
bitMap * : G.BitMapPtr;
dBufInfo * : G.DBufInfoPtr;
END;
CONST
(* These are the flags that may be passed to AllocScreenBuffer().
*)
sbScreenBitmap * = 1;
sbCopyBitmap * = 2;
(*
** $VER: preferences.h 38.2 (16.9.92)
**
** Structure definition for old-style preferences
*)
(* ======================================================================== *)
(* === Preferences ======================================================== *)
(* ======================================================================== *)
CONST
(* these are the definitions for the printer configurations *)
filenameSize * = 30; (* Filename size *)
devnameSize * = 16; (* Device-name size *)
pointerSize * = (1 + 16 + 1) * 2; (* Size of Pointer data buffer *)
(* These defines are for the default font size. These actually describe the
* height of the defaults fonts. The default font type is the topaz
* font, which is a fixed width font that can be used in either
* eighty-column or sixty-column mode. The Preferences structure reflects
* which is currently selected by the value found in the variable FontSize,
* which may have either of the values defined below. These values actually
* are used to select the height of the default font. By changing the
* height, the resolution of the font changes as well.
*)
topazEighty * = 8;
topazSixty * = 9;
(* Note: Starting with V36, and continuing with each new version of
* Intuition, an increasing number of fields of struct Preferences
* are ignored by SetPrefs(). (Some fields are obeyed only at the
* initial SetPrefs(), which comes from the devs:system-configuration
* file). Elements are generally superseded as new hardware or software
* features demand more information than fits in struct Preferences.
* Parts of struct Preferences must be ignored so that applications
* calling GetPrefs(), modifying some other part of struct Preferences,
* then calling SetPrefs(), don't end up truncating the extended
* data.
*
* Consult the autodocs for SetPrefs() for further information as
* to which fields are not always respected.
*)
TYPE
Preferences * = RECORD
(* the default font height *)
fontHeight * : SHORTINT; (* height for system default font *)
(* constant describing what's hooked up to the port *)
printerPort * : E.UBYTE; (* printer port connection *)
(* the baud rate of the port *)
baudRate * : E.UWORD; (* baud rate for the serial port *)
(* various timing rates *)
keyRptSpeed * : T.TimeVal; (* repeat speed for keyboard *)
keyRptDelay * : T.TimeVal; (* Delay before keys repeat *)
doubleClick * : T.TimeVal; (* Interval allowed between clicks *)
(* Intuition Pointer data *)
pointerMatrix * : ARRAY pointerSize OF E.UWORD; (* Definition of pointer sprite *)
xOffset * : SHORTINT; (* X-Offset for active 'bit' *)
yOffset * : SHORTINT; (* Y-Offset for active 'bit' *)
color17 * : E.UWORD; (***********************************)
color18 * : E.UWORD; (* Colours for sprite pointer *)
color19 * : E.UWORD; (***********************************)
pointerTicks * : E.UWORD; (* Sensitivity of the pointer *)
(* Workbench Screen colors *)
color0 * : E.UWORD; (***********************************)
color1 * : E.UWORD; (* Standard default colours *)
color2 * : E.UWORD; (* Used in the Workbench *)
color3 * : E.UWORD; (***********************************)
(* positioning data for the Intuition View *)
viewXOffset * : SHORTINT; (* Offset for top lefthand corner *)
viewYOffset * : SHORTINT; (* X and Y dimensions *)
viewInitX *, ViewInitY * : INTEGER; (* View initial offset values *)
enableCLI * : E.WSET; (* CLI availability switch *)
(* printer configurations *)
printerType * : E.UWORD; (* printer type *)
printerFilename * : ARRAY filenameSize OF CHAR; (* file for printer *)
(* print format and quality configurations *)
printPitch * : E.UWORD; (* print pitch *)
printQuality * : E.UWORD; (* print quality *)
printSpacing * : E.UWORD; (* number of lines per inch *)
printLeftMargin * : E.UWORD; (* left margin in characters *)
printRightMargin * : E.UWORD; (* right margin in characters *)
printImage * : E.UWORD; (* positive or negative *)
printAspect * : E.UWORD; (* horizontal or vertical *)
printShade * : E.UWORD; (* b&w, half-tone, or color *)
printThreshold * : INTEGER; (* darkness ctrl for b/w dumps *)
(* print paper descriptors *)
paperSize * : E.UWORD; (* paper size *)
paperLength * : E.UWORD; (* paper length in number of lines *)
paperType * : E.UWORD; (* continuous or single sheet *)
(* Serial device settings: These are six nibble-fields in three bytes *)
(* (these look a little strange so the defaults will map out to zero) *)
serRWBits * : E.UBYTE; (* upper nibble * = (8-number of read bits) *)
(* lower nibble * = (8-number of write bits) *)
serStopBuf * : E.UBYTE; (* upper nibble * = (number of stop bits - 1) *)
(* lower nibble * = (table value for BufSize) *)
serParShk * : E.UBYTE; (* upper nibble * = (value for Parity setting) *)
(* lower nibble * = (value for Handshake mode) *)
laceWB * : E.BSET; (* if workbench is to be interlaced *)
pad * : ARRAY 12 OF E.UBYTE;
prtDevName * : ARRAY devnameSize OF CHAR; (* device used by printer.device
* (omit the ".device")
*)
defaultPrtUnit * : E.UBYTE; (* default unit opened by printer.device *)
defaultSerUnit * : E.UBYTE; (* default serial unit *)
rowSizeChange * : SHORTINT; (* affect NormalDisplayRows/Columns *)
columnSizeChange * : SHORTINT;
printFlags * : E.WSET; (* user preference flags *)
printMaxWidth * : E.UWORD; (* max width of printed picture in 10ths/in *)
printMaxHeight * : E.UWORD; (* max height of printed picture in 10ths/in *)
printDensity * : E.UBYTE; (* print density *)
printXOffset * : E.UBYTE; (* offset of printed picture in 10ths/inch *)
width * : E.UWORD; (* override default workbench width *)
height * : E.UWORD; (* override default workbench height *)
depth * : E.UBYTE; (* override default workbench depth *)
extsize * : E.UBYTE; (* extension information -- do not touch! *)
(* extension size in blocks of 64 bytes *)
END; (* Preferences *)
CONST
(* Workbench Interlace (use one bit) *)
laceWB * = 0;
lwReserved * = 1; (* internal use only *)
(* EnableCLI *)
screenDrag * = 14;
mouseAccel * = 15;
(* PrinterPort *)
parallelPrinter * = 00H;
serialPrinter * = 01H;
(* BaudRate *)
baud110 * = 00H;
baud300 * = 01H;
baud1200 * = 02H;
baud2400 * = 03H;
baud4800 * = 04H;
baud9600 * = 05H;
baud19200 * = 06H;
baudMidi * = 07H;
(* PaperType *)
fanfold * = 00H;
single * = 80H;
(* PrintPitch *)
pica * = 000H;
elite * = 400H;
fine * = 800H;
(* PrintQuality *)
draft * = 000H;
letter * = 100H;
(* PrintSpacing *)
sixLPI * = 000H;
eightLPI * = 200H;
(* Print Image *)
imagePositive * = 00H;
imageNegative * = 01H;
(* PrintAspect *)
aspectHoriz * = 00H;
aspectVert * = 01H;
(* PrintShade *)
shadeBW * = 00H;
shadeGreyscale * = 01H;
shadeColor * = 02H;
(* PaperSize (all paper sizes have a zero in the lowest nybble) *)
usLetter * = 00H;
usLegal * = 10H;
nTractor * = 20H;
wTractor * = 30H;
custom * = 40H;
(* New PaperSizes for V36: *)
euroA0 * = 50H; (* European size A0: 841 x 1189 *)
euroA1 * = 60H; (* European size A1: 594 x 841 *)
euroA2 * = 70H; (* European size A2: 420 x 594 *)
euroA3 * = 80H; (* European size A3: 297 x 420 *)
euroA4 * = 90H; (* European size A4: 210 x 297 *)
euroA5 * = 0A0H; (* European size A5: 148 x 210 *)
euroA6 * = 0B0H; (* European size A6: 105 x 148 *)
euroA7 * = 0C0H; (* European size A7: 74 x 105 *)
euroA8 * = 0D0H; (* European size A8: 52 x 74 *)
(* PrinterType *)
customName * = 00H;
alphaP101 * = 01H;
brother15XL * = 02H;
cbmMps1000 * = 03H;
diab630 * = 04H;
diabAdvD25 * = 05H;
diabC150 * = 06H;
epson * = 07H;
epsonJX80 * = 08H;
okimate20 * = 09H;
qumeLP20 * = 0AH;
(* new printer entries, 3 October 1985 *)
hpLaserjet * = 0BH;
hpLaserjetPlus * = 0CH;
(* Serial Input Buffer Sizes *)
sbuf512 * = 00H;
sbuf1024 * = 01H;
sbuf2048 * = 02H;
sbuf4096 * = 03H;
sbuf8000 * = 04H;
sbuf16000 * = 05H;
(* Serial Bit Masks *)
sReadBits * = 0F0X; (* for SerRWBits *)
sWriteBits * = 0FX;
sStopBits * = 0F0X; (* for SerStopBuf *)
sBufSizeBits * = 0FX;
sParityBits * = 0F0X; (* for SerParShk *)
sHShakeBits * = 0FX;
(* Serial Parity (upper nibble, after being shifted by
* macro SPARNUM() )
*)
sParityNone * = 0;
sParityEven * = 1;
sParityOdd * = 2;
(* New parity definitions for V36: *)
sParityMark * = 3;
sParitySpace * = 4;
(* Serial Handshake Mode (lower nibble, after masking using
* macro SHANKNUM() )
*)
sHShakeXon * = 0;
sHShakeRts * = 1;
sHShakeNone * = 2;
(* new defines for PrintFlags *)
correctRed * = 0; (* color correct red shades *)
correctGreen * = 1; (* color correct green shades *)
correctBlue * = 2; (* color correct blue shades *)
centerImage * = 3; (* center image on paper *)
ignoreDimensions * = {}; (* ignore max width/height settings *)
boundedDimensions * = 4; (* use max width/height as boundaries *)
absoluteDimensions * = 5; (* use max width/height as absolutes *)
pixelDimensions * = 6; (* use max width/height as prt pixels *)
multiplyDimensions * = 7; (* use max width/height as multipliers *)
integerScaling * = 8; (* force integer scaling *)
orderedDithering * = {}; (* ordered dithering *)
halftoneDithering * = 9; (* halftone dithering *)
floydDithering * = 10; (* Floyd-Steinberg dithering *)
antiAlias * = 11; (* anti-alias image *)
greyScale2 * = 12; (* for use with hi-res monitor *)
(* masks used for checking bits *)
correctRGBMask * = { correctRed, correctGreen, correctBlue };
dimensionsMask * = { boundedDimensions, absoluteDimensions, pixelDimensions, multiplyDimensions };
ditheringMask * = { halftoneDithering, floydDithering };
(*
** $VER: intuition.h 38.26 (15.2.93)
**
** Interface definitions for Intuition applications.
** (Continued...)
*)
(* ======================================================================== *)
(* === Remember =========================================================== *)
(* ======================================================================== *)
(* this structure is used for remembering what memory has been allocated to
* date by a given routine, so that a premature abort or systematic exit
* can deallocate memory cleanly, easily, and completely
*)
TYPE
Remember * = RECORD
nextRemember * : RememberPtr;
rememberSize * : E.ULONG;
memory * : E.APTR;
END; (* Remember *)
(* === Color Spec ====================================================== *)
(* How to tell Intuition about RGB values for a color table entry.
* NOTE: The way the structure was defined, the color value was
* right-justified within each UWORD. This poses problems for
* extensibility to more bits-per-gun. The saColors32 tag to
* OpenScreenTags() provides an alternate way to specify colors
* with greater precision.
*)
TYPE
ColorSpec * = RECORD
colorIndex * : INTEGER; (* -1 terminates an array of ColorSpec *)
red * : E.UWORD; (* only 6 bits recognized in V36 *)
green * : E.UWORD; (* only 6 bits recognized in V36 *)
blue * : E.UWORD; (* only 6 bits recognized in V36 *)
END; (* ColorSpec *)
(* === Easy Requester Specification ======================================= *)
(* see also autodocs for EasyRequest and BuildEasyRequest *)
(* NOTE: This structure may grow in size in the future *)
TYPE
EasyStruct * = RECORD
structSize * : E.ULONG; (* should be sizeof (struct EasyStruct )*)
flags * : SET; (* should be 0 for now *)
title * : E.STRPTR; (* title of requester window *)
textFormat * : E.STRPTR; (* 'printf' style formatting string *)
gadgetFormat * : E.STRPTR; (* 'printf' style formatting string *)
END; (* EasyStruct *)
(* ======================================================================== *)
(* === Miscellaneous ====================================================== *)
(* ======================================================================== *)
CONST
(* = MENU STUFF =========================================================== *)
noMenu * = 001FH;
noItem * = 003FH;
noSub * = 001FH;
menuNull * = -1; (* 0FFFFH *)
(* these defines are for the COMMSEQ and CHECKIT menu stuff. If CHECKIT,
* I'll use a generic Width (for all resolutions) for the CheckMark.
* If COMMSEQ, likewise I'll use this generic stuff
*)
checkWidth * = 19;
commWidth * = 27;
lowCheckWidth * = 13;
lowCommWidth * = 16;
(* these are the AlertNumber defines. if you are calling DisplayAlert()
* the AlertNumber you supply must have the alertTYPE bits set to one
* of these patterns
*)
alertType * = 80000000H;
recoveryAlert * = 00000000H; (* the system can recover from this *)
deadendAlert * = 80000000H; (* no recovery possible, this is it *)
(* When you're defining IntuiText for the Positive and Negative Gadgets
* created by a call to AutoRequest(), these defines will get you
* reasonable-looking text. The only field without a define is the IText
* field; you decide what text goes with the Gadget
*)
autoFrontPen * = 0;
autoBackPen * = 1;
autoDrawMode * = G.jam2;
autoLeftEdge * = 6;
autoTopEdge * = 3;
autoITextFont * = E.NULL;
autoNextText * = E.NULL;
(* --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) ------------------- *)
selectUp * = IE.codeLButton + IE.codeUpPrefix;
selectDown * = IE.codeLButton;
menuUp * = IE.codeRButton + IE.codeUpPrefix;
menuDown * = IE.codeRButton;
middleUp * = IE.codeMButton + IE.codeUpPrefix;
middleDown * = IE.codeMButton;
altLeft * = { IE.qualLAlt };
altRight * = { IE.qualRAlt };
amigaLeft * = { IE.qualLCommand };
amigaRight * = { IE.qualRCommand };
amigaKeys * = amigaLeft + amigaRight;
cursorUp * = 4CH;
cursorLeft * = 4FH;
cursorRight * = 4EH;
cursorDown * = 4DH;
keycodeQ * = 10H;
keycodeZ * = 31H;
keycodeX * = 32H;
keycodeV * = 34H;
keycodeB * = 35H;
keycodeN * = 36H;
keycodeM * = 37H;
keycodeLess * = 38H;
keycodeGreater * = 39H;
(* New for V39, Intuition supports the IE.subClassNewTablet subclass
* of the IE.classNewPointerPos event. The eventAddress of such
* an event points to a TabletData structure (see below).
*
* The TabletData structure contains certain elements including a taglist.
* The taglist can be used for special tablet parameters. A tablet driver
* should include only those tag-items the tablet supports. An application
* can listen for any tag-items that interest it. Note: an application
* must set the waTabletMessages attribute to TRUE to receive this
* extended information in its IntuiMessages.
*
* The definitions given here MUST be followed. Pay careful attention
* to normalization and the interpretation of signs.
*
* tabletaTabletZ: the current value of the tablet in the Z direction.
* This unsigned value should typically be in the natural units of the
* tablet. You should also provide tabletaRangeZ.
*
* tabletaRangeZ: the maximum value of the tablet in the Z direction.
* Normally specified along with tabletaTabletZ, this allows the
* application to scale the actual Z value across its range.
*
* tabletaAngleX: the angle of rotation or tilt about the X-axis. This
* number should be normalized to fill a signed long integer. Positive
* values imply a clockwise rotation about the X-axis when viewing
* from +X towards the origin.
*
* tabletaAngleY: the angle of rotation or tilt about the Y-axis. This
* number should be normalized to fill a signed long integer. Positive
* values imply a clockwise rotation about the Y-axis when viewing
* from +Y towards the origin.
*
* tabletaAngleZ: the angle of rotation or tilt about the Z axis. This
* number should be normalized to fill a signed long integer. Positive
* values imply a clockwise rotation about the Z-axis when viewing
* from +Z towards the origin.
*
* Note: a stylus that supports tilt should use the tabletaAngleX
* and tabletaAngleY attributes. Tilting the stylus so the tip
* points towards increasing or decreasing X is actually a rotation
* around the Y-axis. Thus, if the stylus tip points towards
* positive X, then that tilt is represented as a negative
* tabletaAngleY. Likewise, if the stylus tip points towards
* positive Y, that tilt is represented by positive tabletaAngleX.
*
* tabletaPressure: the pressure reading of the stylus. The pressure
* should be normalized to fill a signed long integer. Typical devices
* won't generate negative pressure, but the possibility is not precluded.
* The pressure threshold which is considered to cause a button-click is
* expected to be set in a Preferences program supplied by the tablet
* vendor. The tablet driver would send IE.codeLButton-type events as
* the pressure crossed that threshold.
*
* tabletaButtonBits: ti_Data is a long integer whose bits are to
* be interpreted at the state of the first 32 buttons of the tablet.
*
* tabletaInProximity: ti_Data is a boolean. For tablets that support
* proximity, they should send the {tabletaInProximity,FALSE} tag item
* when the stylus is out of proximity. One possible use we can forsee
* is a mouse-blanking commodity which keys off this to blank the
* mouse. When this tag is absent, the stylus is assumed to be
* in proximity.
*
* tabletaResolutionX: ti_Data is an unsigned long integer which
* is the x-axis resolution in dots per inch.
*
* tabletaResolutionY: ti_Data is an unsigned long integer which
* is the y-axis resolution in dots per inch.
*)
CONST
tabletaDummy * = U.tagUser + 03A000H;
tabletaTabletZ * = tabletaDummy + 01H;
tabletaRangeZ * = tabletaDummy + 02H;
tabletaAngleX * = tabletaDummy + 03H;
tabletaAngleY * = tabletaDummy + 04H;
tabletaAngleZ * = tabletaDummy + 05H;
tabletaPressure * = tabletaDummy + 06H;
tabletaButtonBits * = tabletaDummy + 07H;
tabletaInProximity * = tabletaDummy + 08H;
tabletaResolutionX * = tabletaDummy + 09H;
tabletaResolutionY * = tabletaDummy + 0AH;
(* If your window sets waTabletMessages to TRUE, then it will receive
* extended IntuiMessages (struct ExtIntuiMessage) whose tabletData
* field points at a TabletData structure. This structure contains
* additional information about the input event.
*)
TYPE
TabletData * = RECORD
(* Sub-pixel position of tablet, in screen coordinates,
* scaled to fill a UWORD fraction:
*)
xFraction *, yFraction * : E.UWORD;
(* Current tablet coordinates along each axis: *)
tabletX *, tabletY * : E.ULONG;
(* Tablet range along each axis. For example, if td_TabletX
* can take values 0-999, td_RangeX should be 1000.
*)
rangeX *, rangeY * : E.ULONG;
(* Pointer to tag-list of additional tablet attributes.
* See <intuition/intuition.h> for the tag values.
*)
tagList * : U.TagListPtr;
END;
(* If a tablet driver supplies a hook for callBack, it will be
* invoked in the standard hook manner. A0 will point to the Hook
* itself, A2 will point to the InputEvent that was sent, and
* A1 will point to a TabletHookData structure. The InputEvent's
* ie_EventAddress field points at the IENewTablet structure that
* the driver supplied.
*
* Based on the thd_Screen, thd_Width, and thd_Height fields, the driver
* should scale the ient_TabletX and ient_TabletY fields and store the
* result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and
* ient_ScaledYFraction.
*
* The tablet hook must currently return NULL. This is the only
* acceptable return-value under V39.
*)
TYPE
TabletHookData * = RECORD
(* Pointer to the active screen:
* Note: if there are no open screens, thd_Screen will be NULL.
* thd_Width and thd_Height will then describe an NTSC 640x400
* screen. Please scale accordingly.
*)
screen * : ScreenPtr;
(* The width and height (measured in pixels of the active screen)
* that your are to scale to:
*)
width * : E.ULONG;
height * : E.ULONG;
(* Non-zero if the screen or something about the screen
* changed since the last time you were invoked:
*)
screenChanged * : LONGINT;
END;
(*
** $VER: sghooks.h 38.1 (11.11.91)
**
** string gadget extensions and hooks
*)
TYPE
StringExtend * = RECORD
(* display specifications *)
font * : G.TextFontPtr; (* must be an open Font (not TextAttr) *)
pens * : ARRAY 2 OF E.UBYTE; (* color of text/backgroun *)
activePens * : ARRAY 2 OF E.UBYTE; (* colors when gadget is active *)
(* edit specifications *)
initialModes * : SET; (* initial mode flags, below *)
editHook * : U.HookPtr; (* if non-NULL, must supply WorkBuffer *)
workBuffer * : E.APTR; (* must be as large as StringInfo.Buffer*)
reserved * : ARRAY 4 OF E.ULONG; (* set to 0 *)
END; (* StringExtend *)
SGWork * = RECORD
(* set up when gadget is first activated *)
gadget * : GadgetPtr; (* the contestant itself *)
stringInfo * : StringInfoPtr; (* easy access to sinfo *)
workBuffer * : E.APTR; (* intuition's planned result *)
prevBuffer * : E.APTR; (* what was there before *)
modes * : SET; (* current mode *)
(* modified for each input event *)
iEvent * : IE.InputEventBasePtr; (* actual event: do not change *)
code * : E.UWORD; (* character code, if one byte *)
bufferPos * : INTEGER; (* cursor position *)
numChars * : INTEGER;
actions * : SET; (* what Intuition will do *)
longInt * : LONGINT; (* temp storage for longint *)
gadgetInfo * : GadgetInfoPtr; (* see cghooks.h *)
editOp * : E.UWORD; (* from constants below *)
END; (* SGWork *)
CONST
(* SGWork.EditOp -
* These values indicate what basic type of operation the global
* editing hook has performed on the string before your gadget's custom
* editing hook gets called. You do not have to be concerned with the
* value your custom hook leaves in the EditOp field, only if you
* write a global editing hook.
*
* For most of these general edit operations, you'll want to compare
* the BufferPos and NumChars of the StringInfo (before global editing)
* and SGWork (after global editing).
*)
eoNoOp * = 0001H;
(* did nothing *)
eoDelBackward * = 0002H;
(* deleted some chars (maybe 0). *)
eoDelForward * = 0003H;
(* deleted some characters under and in front of the cursor *)
eoMoveCursor * = 0004H;
(* moved the cursor *)
eoEnter * = 0005H;
(* "enter" or "return" key, terminate *)
eoReset * = 0006H;
(* current Intuition-style undo *)
eoReplaceChar * = 0007H;
(* replaced one character and (maybe) advanced cursor *)
eoInsertChar * = 0008H;
(* inserted one char into string or added one at end *)
eoBadFormat * = 0009H;
(* didn't like the text data, e.g., Bad LONGINT *)
eoBigChange * = 000AH; (* unused by Intuition *)
(* complete or major change to the text, e.g. new string *)
eoUndo * = 000BH; (* unused by Intuition *)
(* some other style of undo *)
eoClear * = 000CH;
(* clear the string *)
eoSpecial * = 000DH; (* unused by Intuition *)
(* some operation that doesn't fit into the categories here *)
(* Mode Flags definitions (ONLY first group allowed as InitialModes) *)
sgmReplace * = 0; (* replace mode *)
(* please initialize StringInfo with in-range value of BufferPos
* if you are using sgmREPLACE mode.
*)
sgmFixedField * = 1; (* fixed length buffer *)
(* always set sgmREPLACE, too *)
sgmNoFilter * = 2; (* don't filter control chars *)
(* sgmExitHelp is new for V37, and ignored by V36: *)
sgmExitHelp * = 7; (* exit with code * = 5FH if HELP hit *)
(* These Mode Flags are for internal use only *)
sgmNoChange * = 3; (* no edit changes yet *)
sgmNoWorkB * = 4; (* Buffer == PrevBuffer *)
sgmControl * = 5; (* control char escape mode *)
sgmLongint * = 6; (* an intuition longint gadget *)
(* String Gadget Action Flags (put in SGWork.Actions by EditHook) *)
sgaUse * = 0; (* use contents of SGWork *)
sgaEnd * = 1; (* terminate gadget, code in Code field *)
sgaBeep * = 2; (* flash the screen for the user *)
sgaReuse * = 3; (* reuse input event *)
sgaRedisplay * = 4; (* gadget visuals changed *)
(* New for V37: *)
sgaNextActive * = 5; (* Make next possible gadget active. *)
sgaPrevActive * = 6; (* Make previous possible gadget active.*)
(* function id for only existing custom string gadget edit hook *)
sghKey * = 1; (* process editing keystroke *)
sghClick * = 2; (* process mouse click cursor position *)
(* Here's a brief summary of how the custom string gadget edit hook works:
* You provide a hook in StringInfo.Extension.EditHook.
* The hook is called in the standard way with the 'object'
* a pointer to SGWork, and the 'message' a pointer to a command
* block, starting either with (longword) sghKey, sghClick,
* or something new.
*
* You return 0 if you don't understand the command (sghKey is
* required and assumed). Return non-zero if you implement the
* command.
*
* sghKEY:
* There are no parameters following the command longword.
*
* Intuition will put its idea of proper values in the SGWork
* before calling you, and if you leave sgaUse set in the
* SGWork.Actions field, Intuition will use the values
* found in SGWork fields WorkBuffer, NumChars, BufferPos,
* and LongInt, copying the WorkBuffer back to the StringInfo
* Buffer.
*
* NOTE WELL: You may NOT change other SGWork fields.
*
* If you clear sgaUSE, the string gadget will be unchanged.
*
* If you set sgaEND, Intuition will terminate the activation
* of the string gadget. If you also set sgaREUSE, Intuition
* will reuse the input event after it deactivates your gadget.
*
* In this case, Intuition will put the value found in SGWork.Code
* into the IntuiMessage.Code field of the idcmpGADGETUP message it
* sends to the application.
*
* If you set sgaBEEP, Intuition will call DisplayBeep(); use
* this if the user has typed in error, or buffer is full.
*
* Set sgaREDISPLAY if the changes to the gadget warrant a
* gadget redisplay. Note: cursor movement requires a redisplay.
*
* Starting in V37, you may set sgaPREVACTIVE or sgaNEXTACTIVE
* when you set sgaEND. This tells Intuition that you want
* the next or previous gadget with gflgTABCYCLE to be activated.
*
* sghCLICK:
* This hook command is called when Intuition wants to position
* the cursor in response to a mouse click in the string gadget.
*
* Again, here are no parameters following the command longword.
*
* This time, Intuition has already calculated the mouse position
* character cell and put it in SGWork.BufferPos. The previous
* BufferPos value remains in the SGWork.StringInfo.BufferPos.
*
* Intuition will again use the SGWork fields listed above for
* sghKEY. One restriction is that you are NOT allowed to set
* sgaEND or sgaREUSE for this command. Intuition will not
* stand for a gadget which goes inactive when you click in it.
*
* You should always leave the sgaREDISPLAY flag set, since Intuition
* uses this processing when activating a string gadget.
*)
(*
** $VER: cghooks.h 38.1 (11.11.91)
**
** Custom Gadget processing
*)
TYPE
(*
* Package of information passed to custom and 'boopsi'
* gadget "hook" functions. This structure is READ ONLY.
*)
GadgetInfo * = RECORD
screen - : ScreenPtr;
window - : WindowPtr; (* null for screen gadgets *)
requester - : RequesterPtr; (* null if not gtypREQGADGET *)
(* rendering information:
* don't use these without cloning/locking.
* Official way is to call ObtainRPort()
*)
rastPort - : G.RastPortPtr;
layer - : G.LayerPtr;
(* copy of dimensions of screen/window/g00/req(/group)
* that gadget resides in. Left/Top of this box is
* offset from window mouse coordinates to gadget coordinates
* screen gadgets: 0,0 (from screen coords)
* window gadgets (no g00): 0,0
* gtypGZZGADGETs (borderlayer): 0,0
* GZZ innerlayer gadget: borderleft, bordertop
* Requester gadgets: reqleft, reqtop
*)
domain - : IBox;
(* these are the pens for the window or screen *)
pens - : RECORD
detailPen - : E.UBYTE;
blockPen - : E.UBYTE;
END;
(* the Detail and Block pens in giDrInfo->driPens[] are
* for the screen. Use the above for window-sensitive
* colors.
*)
drInfo - : DrawInfoPtr;
(* reserved space: this structure is extensible
* anyway, but using these saves some recompilation
*)
reserved - : ARRAY 6 OF E.ULONG;
END; (* GadgetInfo *)
(*** system private data structure for now ***)
(* prop gadget extra info *)
PGX = RECORD
container * : IBox;
newKnob * : IBox;
END; (* PGX *)
(*
** $VER: classusr.h 38.2 (14.4.92)
**
** For application users of Intuition object classes
*)
TYPE
(*** User visible handles on objects, classes, messages ***)
ObjectUsr * = E.ULONG; (* abstract handle *)
ClassID * = E.STRPTR;
(* you can use this type to point to a "generic" message,
* in the object-oriented programming parlance. Based on
* the value of 'MethodID', you dispatch to processing
* for the various message types. The meaningful parameter
* packet structure definitions are defined below.
*)
Msg * = RECORD
methodID * : E.ULONG
(* method-specific data follows, some examples below *)
END; (* Msg *)
CONST
(*
* Class id strings for Intuition classes.
* There's no real reason to use the uppercase constants
* over the lowercase strings, but this makes a good place
* to list the names of the built-in classes.
*)
rootClass * = "rootclass"; (* classusr.h *)
imageClass * = "imageclass"; (* imageclass.h *)
frameIClass * = "frameiclass";
sysIClass * = "sysiclass";
fillRectClass * = "fillrectclass";
gadgetClass * = "gadgetclass"; (* gadgetclass.h *)
propGClass * = "propgclass";
strGClass * = "strgclass";
buttonGClass * = "buttongclass";
frButtonClass * = "frbuttonclass";
groupGClass * = "groupgclass";
icClass * = "icclass"; (* icclass.h *)
modelClass * = "modelclass";
iTextIClass * = "itexticlass";
pointerClass * = "pointerclass"; (* pointerclass.h *)
(* Dispatched method ID's
* NOTE: Applications should use Intuition entry points, not direct
* DoMethod() calls, for NewObject, DisposeObject, SetAttrs,
* SetGadgetAttrs, and GetAttr.
*)
omDummy * = 100H;
omNew * = 101H; (* 'object' parameter is "true class" *)
omDispose * = 102H; (* delete self (no parameters) *)
omSet * = 103H; (* set attributes (in tag list) *)
omGet * = 104H; (* return single attribute value *)
omAddTail * = 105H; (* add self to a List (let root do it) *)
omRemove * = 106H; (* remove self from list *)
omNotify * = 107H; (* send to self: notify dependents *)
omUpdate * = 108H; (* notification message from somebody *)
omAddMember * = 109H; (* used by various classes with lists *)
omRemMember * = 10AH; (* used by various classes with lists *)
(* Parameter "Messages" passed to methods *)
(* omNew and omSet *)
TYPE
OpSet * = RECORD (Msg)
attrList * : U.TagListPtr; (* new attributes *)
gInfo * : GadgetInfoPtr; (* always there for gadgets,
* when SetGadgetAttrs() is used,
* but will be NULL for omNEW
*)
END; (* OpSet *)
(* omNOTIFY, and omUPDATE *)
OpUpdate * = RECORD (Msg)
attrList * : U.TagListPtr; (* new attributes *)
gInfo * : GadgetInfoPtr; (* non-NULL when SetGadgetAttrs or
* notification resulting from gadget
* input occurs.
*)
flags * : SET; (* defined below *)
END; (* OpUpdate *)
CONST
(* this flag means that the update message is being issued from
* something like an active gadget, a la gactFollowMouse. When
* the gadget goes inactive, it will issue a final update
* message with this bit cleared. Examples of use are for
* gactFollowMouse equivalents for propgadclass, and repeat strobes
* for buttons.
*)
opuInterim * = 0;
(* omGet *)
TYPE
OpGet * = RECORD (Msg)
attrID * : E.ULONG;
storage * : CPOINTER TO SYS.LONGWORD; (* may be other types, but "int"
* types are all E.ULONG
*)
END; (* OpGet *)
(* omAddTail *)
OpAddTail * = RECORD (Msg)
list * : E.ListPtr;
END; (* OpAddTail *)
(* omAddMember, omRemMember *)
OpMember * = RECORD (Msg)
object : ObjectPtr;
END; (* OpMember *)
(*
** $VER: classes.h 38.1 (11.11.91)
**
** Used only by class implementors
*)
TYPE
(*******************************************)
(*** "White box" access to struct IClass ***)
(*******************************************)
(* This structure is READ-ONLY, and allocated only by Intuition *)
IClass * = RECORD (U.Hook)
reserved - : E.ULONG; (* must be 0 *)
super - : IClassPtr;
id - : ClassID;
(* where within an object is the instance data for this class? *)
instOffset - : E.UWORD;
instSize - : E.UWORD;
userData - : E.ULONG; (* per-class data of your choice *)
subclassCount - : E.ULONG; (* how many direct subclasses? *)
objectCount - : E.ULONG; (* how many objects created of this class? *)
flags - : SET;
END; (* IClass *)
Class * = IClass;
CONST
clInList * = 0; (* class is in public class list *)
TYPE
(**************************************************)
(*** "White box" access to struct Object ***)
(**************************************************)
(*
* We have this, the instance data of the root class, PRECEDING
* the "object". This is so that Gadget objects are Gadget pointers,
* and so on. If this structure grows, it will always have oClass
* at the end, so the macro OCLASS(o) will always have the same
* offset back from the pointer returned from NewObject().
*
* This data structure is subject to change. Do not use the oNode
* embedded structure.
*)
Object * = RECORD (E.MinNode)
class * : IClassPtr;
END; (* Object *)
(*
** $VER: gadgetclass.h 38.10 (8.1.93)
**
** Custom and 'boopsi' gadget class interface
*)
CONST
(* Gadget Class attributes *)
gaDummy * = U.tagUser + 30000H;
gaLeft * = gaDummy + 0001H;
gaRelRight * = gaDummy + 0002H;
gaTop * = gaDummy + 0003H;
gaRelBottom * = gaDummy + 0004H;
gaWidth * = gaDummy + 0005H;
gaRelWidth * = gaDummy + 0006H;
gaHeight * = gaDummy + 0007H;
gaRelHeight * = gaDummy + 0008H;
gaText * = gaDummy + 0009H; (* tiData is (E.UBYTE * *)
gaImage * = gaDummy + 000AH;
gaBorder * = gaDummy + 000BH;
gaSelectRender * = gaDummy + 000CH;
gaHighlight * = gaDummy + 000DH;
gaDisabled * = gaDummy + 000EH;
gaGZZGadget * = gaDummy + 000FH;
gaID * = gaDummy + 0010H;
gaUserData * = gaDummy + 0011H;
gaSpecialInfo * = gaDummy + 0012H;
gaSelected * = gaDummy + 0013H;
gaEndGadget * = gaDummy + 0014H;
gaImmediate * = gaDummy + 0015H;
gaRelVerify * = gaDummy + 0016H;
gaFollowMouse * = gaDummy + 0017H;
gaRightBorder * = gaDummy + 0018H;
gaLeftBorder * = gaDummy + 0019H;
gaTopBorder * = gaDummy + 001AH;
gaBottomBorder * = gaDummy + 001BH;
gaToggleSelect * = gaDummy + 001CH;
(* internal use only, until further notice, please *)
gaSysGadget * = gaDummy + 001DH;
(* bool, sets gtypSysGadget field in type *)
gaSysGType * = gaDummy + 001EH;
(* e.g., gtypWUpFront, ... *)
gaPrevious * = gaDummy + 001FH;
(* previous gadget (or (struct Gadget ** )) in linked list
* NOTE: This attribute CANNOT be used to link new gadgets
* into the gadget list of an open window or requester.
* You must use AddGList().
*)
gaNext * = gaDummy + 0020H;
(* not implemented *)
gaDrawInfo * = gaDummy + 0021H;
(* some fancy gadgets need to see a DrawInfo
* when created or for layout
*)
(* You should use at most ONE of gaText, gaIntuiText, and gaLabelImage *)
gaIntuiText * = gaDummy + 0022H;
(* tiData is (struct IntuiText * ) *)
gaLabelImage * = gaDummy + 0023H;
(* tiData is an image (object), used in place of
* GadgetText
*)
gaTabCycle * = gaDummy + 0024H;
(* New for V37:
* Boolean indicates that this gadget is to participate in
* cycling activation with Tab or Shift-Tab.
*)
gaGadgetHelp * = gaDummy + 0025H;
(* New for V39:
* Boolean indicates that this gadget sends gadget-help
*)
gaBounds * = gaDummy + 0026H;
(* New for V39:
* ti_Data is a pointer to an IBox structure which is
* to be copied into the extended gadget's bounds.
*)
gaRelSpecial * = gaDummy + 0027H;
(* New for V39:
* Boolean indicates that this gadget has the "special relativity"
* property, which is useful for certain fancy relativity
* operations through the gmLayout method.
*)
(* PROPGCLASS attributes *)
pgaDummy * = U.tagUser + 31000H;
pgaFreedom * = pgaDummy + 0001H;
(* only one of FREEVERT or FREEHORIZ *)
pgaBorderless * = pgaDummy + 0002H;
pgaHorizPot * = pgaDummy + 0003H;
pgaHorizBody * = pgaDummy + 0004H;
pgaVertPot * = pgaDummy + 0005H;
pgaVertBody * = pgaDummy + 0006H;
pgaTotal * = pgaDummy + 0007H;
pgaVisible * = pgaDummy + 0008H;
pgaTop * = pgaDummy + 0009H;
(* New for V37: *)
pgaNewLook * = pgaDummy + 000AH;
(* STRGCLASS attributes *)
stringaDummy * = U.tagUser + 32000H;
stringaMaxChars * = stringaDummy + 0001H;
(* Note: There is a minor problem with Intuition when using boopsi integer
* gadgets (which are requested by using stringaLongInt). Such gadgets
* must not have a stringaMaxChars to be bigger than 15. Setting
* stringaMaxChars for a boopsi integer gadget will cause a mismatched
* FreeMem() to occur.
*)
stringaBuffer * = stringaDummy + 0002H;
stringaUndoBuffer * = stringaDummy + 0003H;
stringaWorkBuffer * = stringaDummy + 0004H;
stringaBufferPos * = stringaDummy + 0005H;
stringaDispPos * = stringaDummy + 0006H;
stringaAltKeyMap * = stringaDummy + 0007H;
stringaFont * = stringaDummy + 0008H;
stringaPens * = stringaDummy + 0009H;
stringaActivePens * = stringaDummy + 000AH;
stringaEditHook * = stringaDummy + 000BH;
stringaEditModes * = stringaDummy + 000CH;
(* booleans *)
stringaReplaceMode * = stringaDummy + 000DH;
stringaFixedFieldMode * = stringaDummy + 000EH;
stringaNoFilterMode * = stringaDummy + 000FH;
stringaJustification * = stringaDummy + 0010H;
(* gactSTRINGCENTER, gactSTRINGLEFT, gactSTRINGRIGHT *)
stringaLongVal * = stringaDummy + 0011H;
stringaTextVal * = stringaDummy + 0012H;
stringaExitHelp * = stringaDummy + 0013H;
(* stringaExitHelp is new for V37, and ignored by V36.
* Set this if you want the gadget to exit when Help is
* pressed. Look for a code of 5FH, the rawkey code for Help
*)
sgDefaultMaxChars * = 128;
(* Gadget Layout related attributes *)
layoutaDummy * = U.tagUser + 38000H;
layoutaLayoutObj * = layoutaDummy + 0001H;
layoutaSpacing * = layoutaDummy + 0002H;
layoutaOrientation * = layoutaDummy + 0003H;
(* orientation values *)
lOrientNone * = 0;
lOrientHoriz * = 1;
lOrientVert * = 2;
(* Gadget Method ID's *)
gmDummy * = -1; (* not used for anything *)
gmHitTest * = 0; (* return gmrGADGETHIT if you are clicked on
* (whether or not you are disabled).
*)
gmRender * = 1; (* draw yourself, in the appropriate state *)
gmGoActive * = 2; (* you are now going to be fed input *)
gmHandleInput * = 3; (* handle that input *)
gmGoInactive * = 4; (* whether or not by choice, you are done *)
gmHelpTest * = 5; (* Will you send gadget help if the mouse is
* at the specified coordinates? See below
* for possible GMR_ values.
*)
gmLayout * = 6; (* re-evaluate your size based on the GadgetInfo
* Domain. Do NOT re-render yourself yet, you
* will be called when it is time...
*)
(* Parameter "Messages" passed to gadget class methods *)
TYPE
(* gmHitTest and gmHelpTest send this message.
* For gmHitTest, mouse are coordinates relative to the gadget
* select box. For gmHelpTest, the coordinates are relative to
* the gadget bounding box (which defaults to the select box).
*)
HitTest * = RECORD (Msg)
gInfo * : GadgetInfoPtr;
mouse * : G.Point;
END; (* HitTest *)
(* For gmHitTest, return gmrGadgetHit if you were indeed hit,
* otherwise return zero.
*
* For gmHelpTest, return gmrNoHelpHit (zero) if you were not hit.
* Typically, return gmrHelpHit if you were hit.
* It is possible to pass a UWORD to the application via the Code field
* of the idcmpGadgetHelp message. Return gmrHelpCode or'd with
* the UWORD-sized result you wish to return.
*
* gmrHelpHit yields a Code value of -1, which should
* mean "nothing particular" to the application.
*)
CONST
gmrGadgetHit * = 000000004H; (* gmHitTest hit *)
gmrNoHelpHit * = 000000000H; (* gmHelpTest didn't hit *)
gmrHelpHit * = 0FFFFFFFFH; (* gmHelpTest hit, return code = ~0 *)
gmrHelpCode * = 000010000H; (* gmHelpTest hit, return low word as code *)
TYPE
(* gmRender *)
Render * = RECORD (Msg)
gInfo * : GadgetInfoPtr; (* gadget context *)
rPort * : G.RastPortPtr; (* all ready for use *)
redraw * : LONGINT; (* might be a "highlight pass" *)
END; (* Render *)
CONST
(* values of gprRedraw *)
gRedrawUpdate * = 2; (* incremental update, e.g. prop slider *)
gRedrawRedraw * = 1; (* redraw gadget *)
gRedrawToggle * = 0; (* toggle highlight, if applicable *)
(* gmGoActive, gmHandleInput *)
TYPE
Input * = RECORD (Msg)
gInfo * : GadgetInfoPtr;
iEvent * : IE.InputEventBasePtr;
termination * : E.APTR;
mouse * : G.Point;
(* (V39) Pointer to TabletData structure, if this event originated
* from a tablet which sends IE.subClassNewTablet events, or NULL if
* not.
*
* DO NOT ATTEMPT TO READ THIS FIELD UNDER INTUITION PRIOR TO V39!
* IT WILL BE INVALID!
*)
tabletData * : TabletDataPtr;
END; (* Input *)
CONST
(* gmHandleInput and gmGoActive return code flags *)
(* return gmrMeActive (0) alone if you want more input.
* Otherwise, return ONE of gmrNoReuse and gmrReuse, and optionally
* gmrVerify.
*)
gmrMeActive * = 0;
gmrNoReuse * = 2;
gmrReuse * = 4;
gmrVerify * = 8; (* you MUST set cgpTermination *)
(* New for V37:
* You can end activation with one of gmrNEXTACTIVE and gmrPREVACTIVE,
* which instructs Intuition to activate the next or previous gadget
* that has gflgTABCYCLE set.
*)
gmrNextActive * = 16;
gmrPrevActive * = 32;
(* gmGoInactive *)
TYPE
GoInactive * = RECORD (Msg)
gInfo * : GadgetInfoPtr;
(* V37 field only! DO NOT attempt to read under V36! *)
abort * : E.ULONG; (* abort=1 if gadget was aborted
* by Intuition and 0 if gadget went
* inactive at its own request
*)
END; (* GoInactive *)
(* New for V39: Intuition sends gmLayout to any grel* gadget when
* the gadget is added to the window (or when the window opens, if
* the gadget was part of the NewWindow.FirstGadget or the WA_Gadgets
* list), or when the window is resized. Your gadget can set the
* GA_RelSpecial property to get gmLayout events without Intuition
* changing the interpretation of your gadget select box. This
* allows for completely arbitrary resizing/repositioning based on
* window size.
*)
(* GM_LAYOUT *)
Layout * = RECORD (Msg)
gInfo * : GadgetInfoPtr;
initial * : E.ULONG; (* non-zero if this method was invoked
* during AddGList() or OpenWindow()
* time. zero if this method was invoked
* during window resizing.
*)
END;
(*
** $VER: icclass.h 38.1 (11.11.91)
**
** Gadget/object interconnection classes
*)
CONST
icmDummy * = 0401H; (* used for nothing *)
icmSetLoop * = 0402H; (* set/increment loop counter *)
icmClearLoop * = 0403H; (* clear/decrement loop counter *)
icmCheckLoop * = 0404H; (* set/increment loop *)
(* no parameters for icmSetLoop, icmClearLoop, icmCheckLoop *)
(* interconnection attributes used by icclass, modelclass, and gadgetclass *)
icaDummy * = U.tagUser + 40000H;
icaTarget * = icaDummy + 1;
(* interconnection target *)
icaMap * = icaDummy + 2;
(* interconnection map tagitem list *)
icSpecialCode * = icaDummy + 3;
(* a "pseudo-attribute", see below. *)
(* Normally, the value for icaTarget is some object pointer,
* but if you specify the special value icTargetIDCMP, notification
* will be send as an idcmpIDCMPUpdate message to the appropriate window's
* IDCMP port. See the definition of idcmpIDCMPUpdate.
*
* When you specify icTargetIDCMP for icaTarget, the map you
* specify will be applied to derive the attribute list that is
* sent with the idcmpIDCMPUpdate message. If you specify a map list
* which results in the attribute tag id icSpecialCode, the
* lower sixteen bits of the corresponding tiData value will
* be copied into the Code field of the idcmpIDCMPUpdate IntuiMessage.
*)
icTargetIDCMP * = {0..31};
(*
** $VER: imageclass.h 38.5 (26.3.92)
**
** Definitions for the image classes
*)
CONST
customImageDepth * = -1;
(* if image.Depth is this, it's a new Image class object *)
(******************************************************)
iaDummy * = U.tagUser + 20000H;
iaLeft * = iaDummy + 01H;
iaTop * = iaDummy + 02H;
iaWidth * = iaDummy + 03H;
iaHeight * = iaDummy + 04H;
iaFGPen * = iaDummy + 05H;
(* iaFGPen also means "PlanePick" *)
iaBGPen * = iaDummy + 06H;
(* iaBGPen also means "PlaneOnOff" *)
iaData * = iaDummy + 07H;
(* bitplanes, for classic image,
* other image classes may use it for other things
*)
iaLineWidth * = iaDummy + 08H;
iaPens * = iaDummy + 0EH;
(* pointer to E.UWORD pens[],
* ala DrawInfo.Pens, MUST be
* terminated by ~0. Some classes can
* choose to have this, or sysiaDrawInfo,
* or both.
*)
iaResolution * = iaDummy + 0FH;
(* packed uwords for x/y resolution into a longword
* ala DrawInfo.Resolution
*)
(**** see class documentation to learn which *****)
(**** classes recognize these *****)
iaAPattern * = iaDummy + 10H;
iaAPatSize * = iaDummy + 11H;
iaMode * = iaDummy + 12H;
iaFont * = iaDummy + 13H;
iaOutline * = iaDummy + 14H;
iaRecessed * = iaDummy + 15H;
iaDoubleEmboss * = iaDummy + 16H;
iaEdgesOnly * = iaDummy + 17H;
(**** "sysiclass" attributes *****)
sysiaSize * = iaDummy + 0BH;
(* #define's below *)
sysiaDepth * = iaDummy + 0CH;
(* this is unused by Intuition. sysiaDrawInfo
* is used instead for V36
*)
sysiaWhich * = iaDummy + 0DH;
(* see #define's below *)
sysiaDrawInfo * = iaDummy + 18H;
(* pass to sysiclass, please *)
(***** obsolete: don't use these, use iaPens *****)
sysiaPens * = iaPens;
iaShadowPen * = iaDummy + 09H;
iaHighlightPen * = iaDummy + 0AH;
(* New for V39: *)
sysiaReferenceFont * = iaDummy + 19H;
(* Font to use as reference for scaling
* certain sysiclass images
*)
iaSupportsDisable * = iaDummy + 1AH;
(* By default, Intuition ghosts gadgets itself,
* instead of relying on idsDisabled or
* idsSelectedDisabled. An imageclass that
* supports these states should return this attribute
* as TRUE. You cannot set or clear this attribute,
* however.
*)
iaFrameType * = iaDummy + 1BH;
(* Starting with V39, FrameIClass recognizes
* several standard types of frame. Use one
* of the frame* specifiers below. Defaults
* to frameDefault.
*)
(** next attribute: (iaDummy + 1CH) **)
(*************************************************)
(* data values for sysiaSize *)
sysISizeMedRes * = 0;
sysISizeLowRes * = 1;
sysISizeHires * = 2;
(*
* sysiaWhich tag data values:
* Specifies which system gadget you want an image for.
* Some numbers correspond to internal Intuition #defines
*)
depthImage * = 00H;
zoomImage * = 01H;
sizeImage * = 02H;
closeImage * = 03H;
sDepthImage * = 05H; (* screen depth gadget *)
leftImage * = 0AH;
upImage * = 0BH;
rightImage * = 0CH;
downImage * = 0DH;
checkImage * = 0EH;
mxImage * = 0FH; (* mutual exclude "button" *)
(* New for V39: *)
menuCheck * = 10H; (* Menu checkmark image *)
amigaKey * = 11H; (* Menu Amiga-key image *)
(* Data values for iaFrameType (recognized by FrameIClass)
*
* frameDefault: The standard V37-type frame, which has
* thin edges.
* frameButton: Standard button gadget frames, having thicker
* sides and nicely edged corners.
* frameRidge: A ridge such as used by standard string gadgets.
* You can recess the ridge to get a groove image.
* frameIconDropBox: A broad ridge which is the standard imagery
* for areas in AppWindows where icons may be dropped.
*)
frameDefault * = 0;
frameButton * = 1;
frameRidge * = 2;
frameIconDropBox * = 3;
(* image message id's *)
imDraw * = 202H; (* draw yourself, with "state" *)
imHitTest * = 203H; (* return TRUE if click hits image *)
imErase * = 204H; (* erase yourself *)
imMove * = 205H; (* draw new and erase old, smoothly *)
imDrawFrame * = 206H; (* draw with specified dimensions *)
imFrameBox * = 207H; (* get recommended frame around some box*)
imHitFrame * = 208H; (* hittest with dimensions *)
imEraseFrame * = 209H; (* hittest with dimensions *)
(* image draw states or styles, for imDRAW *)
(* Note that they have no bitwise meanings (unfortunately) *)
idsNormal * = 0;
idsSelected * = 1; (* for selected gadgets *)
idsDisabled * = 2; (* for disabled gadgets *)
idsBusy * = 3; (* for future functionality *)
idsIndeterminate * = 4; (* for future functionality *)
idsInactiveNormal * = 5; (* normal, in inactive window border *)
idsInactiveSelected * = 6; (* selected, in inactive bor`er *)
idsInactiveDisabled * = 7; (* disabled, in inactive border *)
idsSelectedDisabled * = 8; (* disabled and selected *)
(* oops, please forgive spelling error by jimm *)
idsIndeterminant * = idsIndeterminate;
(* imFrameBox *)
TYPE
FrameBox * = RECORD (Msg)
contentsBox * : IBoxPtr; (* input: relative box of contents *)
frameBox * : IBoxPtr; (* output: rel. box of encl frame *)
drInfo * : DrawInfoPtr; (* NB: May be NULL *)
frameFlags * : SET;
END; (* FrameBox *)
CONST
frameSpecify * = 0; (* Make do with the dimensions of FrameBox
* provided.
*)
(* imDraw, imDrawFrame *)
TYPE
Dimensions = RECORD
width * : INTEGER;
height * : INTEGER;
END; (* Dimensions *)
Draw * = RECORD (Msg)
rPort * : G.RastPortPtr;
offset * : G.Point;
state * : E.ULONG;
drInfo * : DrawInfoPtr; (* NB: May be NULL *)
(* these parameters only valid for imDRAWFRAME *)
dimensions * : Dimensions;
END; (* Draw *)
(* imErase, imEraseFrame *)
(* NOTE: This is a subset of Draw *)
TYPE
Erase * = RECORD (Msg)
rPort * : G.RastPortPtr;
offset * : G.Point;
(* these parameters only valid for imERASEFRAME *)
dimensions * : Dimensions;
END; (* Erase *)
(* imHitTest, imHitFrame *)
TYPE
IMHitTest * = RECORD (Msg)
point * : G.Point;
(* these parameters only valid for imHitFrame *)
dimensions * : Dimensions;
END; (* IMHitTest *)
(*
** $VER: pointerclass.h 39.6 (15.2.93)
**
** 'boopsi' pointer class interface
*)
(* The following tags are recognized at NewObject() time by
* pointerclass:
*
* pointeraBitMap (BitMapPtr) - Pointer to bitmap to
* get pointer imagery from. Bitplane data need not be
* in chip RAM.
* pointeraXOffset (LONG) - X-offset of the pointer hotspot.
* pointeraYOffset (LONG) - Y-offset of the pointer hotspot.
* pointeraWordWidth (ULONG) - designed width of the pointer in words
* pointeraXResolution (ULONG) - one of the pointerXResn* flags below
* pointeraYResolution (ULONG) - one of the pointerYResn* flags below
*
*)
CONST
pointeraDummy * = U.tagUser + 039000H;
pointeraBitMap * = pointeraDummy + 01H;
pointeraXOffset * = pointeraDummy + 02H;
pointeraYOffset * = pointeraDummy + 03H;
pointeraWordWidth * = pointeraDummy + 04H;
pointeraXResolution * = pointeraDummy + 05H;
pointeraYResolution * = pointeraDummy + 06H;
(* These are the choices for the pointeraXResolution attribute which
* will determine what resolution pixels are used for this pointer.
*
* pointerXResnDefault (ECS-compatible pointer width)
* = 70 ns if SUPERHIRES-type mode, 140 ns if not
*
* pointerXResnScreenRes
* = Same as pixel speed of screen
*
* pointerXResnLores (pointer always in lores-like pixels)
* = 140 ns in 15kHz modes, 70 ns in 31kHz modes
*
* pointerXResnHires (pointer always in hires-like pixels)
* = 70 ns in 15kHz modes, 35 ns in 31kHz modes
*
* pointerXResn140ns (pointer always in 140 ns pixels)
* = 140 ns always
*
* pointerXResn70ns (pointer always in 70 ns pixels)
* = 70 ns always
*
* pointerXResn35ns (pointer always in 35 ns pixels)
* = 35 ns always
*)
CONST
pointerXResnDefault * = 0;
pointerXResn140ns * = 1;
pointerXResn70ns * = 2;
pointerXResn35ns * = 3;
pointerXResnScreenRes * = 4;
pointerXResnLores * = 5;
pointerXResnHires * = 6;
(* These are the choices for the pointeraYResolution attribute which
* will determine what vertical resolution is used for this pointer.
*
* pointerYResnDefault
* = In 15 kHz modes, the pointer resolution will be the same
* as a non-interlaced screen. In 31 kHz modes, the pointer
* will be doubled vertically. This means there will be about
* 200-256 pointer lines per screen.
*
* pointerYResnHigh
* pointerYResnHighAspect
* = Where the hardware/software supports it, the pointer resolution
* will be high. This means there will be about 400-480 pointer
* lines per screen. pointerYResnHighAspect also means that
* when the pointer comes out double-height due to hardware/software
* restrictions, its width would be doubled as well, if possible
* (to preserve aspect).
*
* pointerYResnScreenRes
* pointerYResnScreenResAspect
* = Will attempt to match the vertical resolution of the pointer
* to the screen's vertical resolution. pointerYResnScreenAspect also
* means that when the pointer comes out double-height due to
* hardware/software restrictions, its width would be doubled as well,
* if possible (to preserve aspect).
*
*)
CONST
pointerYResnDefault * = 0;
pointerYResnHigh * = 2;
pointerYResnHighAspect * = 3;
pointerYResnScreenRes * = 4;
pointerYResnScreenResAspect * = 5;
(* Compatibility note:
*
* The AA chipset supports variable sprite width and resolution, but
* the setting of width and resolution is global for all sprites.
* When no other sprites are in use, Intuition controls the sprite
* width and sprite resolution for correctness based on pointerclass
* attributes specified by the creator of the pointer. Intuition
* controls sprite resolution with the vtagDefSpriteResnSet tag
* to VideoControl(). Applications can override this on a per-viewport
* basis with the vtagSpriteResnSet tag to VideoControl().
*
* If an application uses a sprite other than the pointer sprite,
* Intuition will automatically regenerate the pointer sprite's image in
* a compatible width. This might involve BitMap scaling of the imagery
* you supply.
*
* If any sprites other than the pointer sprite were obtained with the
* old GetSprite() call, Intuition assumes that the owner of those
* sprites is unaware of sprite resolution, hence Intuition will set the
* default sprite resolution (vtagDefSpriteResnSet) to ECS-compatible,
* instead of as requested by the various pointerclass attributes.
*
* No resolution fallback occurs when applications use ExtSprites.
* Such applications are expected to use vtagSpriteResnSet tag if
* necessary.
*
* NB: Under release V39, only sprite width compatibility is implemented.
* Sprite resolution compatibility was added for V40.
*)
(*
** $VER: iobsolete.h 38.1 (22.1.92)
**
** Obsolete identifiers for Intuition. Use the new ones instead!
*)
(* This file contains:
*
* 1. The traditional identifiers for gadget Flags, Activation, and Type,
* and for window Flags and IDCMP classes. They are defined in terms
* of their new versions, which serve to prevent confusion between
* similar-sounding but different identifiers (like IDCMP_WINDOWACTIVE
* and WFLG_ACTIVATE).
*
* 2. Some tag names and constants whose labels were adjusted after V36.
*
* By default, 1 and 2 are enabled.
*
* #define INTUI_V36_NAMES_ONLY to exclude the traditional identifiers and
* the original V36 names of some identifiers.
*
* Oberon-A note: the tags in 2 are not declared here because the only
* difference was in case, which has already been adjusted in the
* translation from C.
*
*)
CONST
(* V34-style Gadget->Flags names: *)
gadgHighBits * = gflgGadgHighBits;
gadgHComp * = gflgGadgHComp;
gadgHBox * = gflgGadgHBox;
gadgHImage * = gflgGadgHImage;
gadgHNone * = gflgGadgHNone;
gadgImage * = gflgGadgImage;
gRelBottom * = gflgRelBottom;
gRelRight * = gflgRelRight;
gRelWidth * = gflgRelWidth;
gRelHeight * = gflgRelHeight;
selected * = gflgSelected;
gadgDisabled * = gflgDisabled;
labelMask * = gflgLabelMask;
labelIText * = gflgLabelIText;
labelString * = gflgLabelString;
labelImage * = gflgLabelImage;
CONST
(* V34-style Gadget->Activation flag names: *)
relVerify * = gactRelVerify;
gadgImmediate * = gactImmediate;
endGadget * = gactEndGadget;
followMouse * = gactFollowMouse;
rightBorder * = gactRightBorder;
leftBorder * = gactLeftBorder;
topBorder * = gactTopBorder;
bottomBorder * = gactBottomBorder;
borderSniff * = gactBorderSniff;
toggleSelect * = gactToggleSelect;
boolExtend * = gactBoolExtend;
stringLeft * = gactStringLeft;
stringCenter * = gactStringCenter;
stringRight * = gactStringRight;
longint * = gactLongint;
altKeymap * = gactAltKeymap;
stringExtend * = gactStringExtend;
activeGadget * = gactActiveGadget;
CONST
(* V34-style Gadget->Type names: *)
gadgetType * = gtypGadgetType;
sysGadget * = gtypSysGadget;
scrGadget * = gtypScrGadget;
gzzGadget * = gtypGzzGadget;
reqGadget * = gtypReqGadget;
sizing * = gtypSizing;
wDragging * = gtypWDragging;
sDragging * = gtypSDragging;
wUpFront * = gtypWUpFront;
sUpFront * = gtypSUpFront;
wDownBack * = gtypWDownBack;
sDownBack * = gtypSDownBack;
close * = gtypClose;
boolGadget * = gtypBoolGadget;
gadget0002 * = gtypGadget0002;
propGadget * = gtypPropGadget;
strGadget * = gtypStrGadget;
customGadget * = gtypCustomGadget;
gTypeMask * = gtypGTypeMask;
CONST
(* V34-style IDCMP class names: *)
sizeVerify * = idcmpSizeVerify;
newSize * = idcmpNewSize;
refreshWindow * = idcmpRefreshWindow;
mouseButtons * = idcmpMouseButtons;
mouseMove * = idcmpMouseMove;
gadgetDown * = idcmpGadgetDown;
gadgetUp * = idcmpGadgetUp;
reqSet * = idcmpReqSet;
menuPick * = idcmpMenuPick;
closeWindow * = idcmpCloseWindow;
rawKey * = idcmpRawKey;
reqVerify * = idcmpReqVerify;
reqClear * = idcmpReqClear;
menuVerify * = idcmpMenuVerify;
newPrefs * = idcmpNewPrefs;
diskInserted * = idcmpDiskInserted;
diskRemoved * = idcmpDiskRemoved;
wBenchMessage * = idcmpWBenchMessage;
activeWindow * = idcmpActiveWindow;
inactiveWindow * = idcmpInactiveWindow;
deltaMove * = idcmpDeltaMove;
vanillaKey * = idcmpVanillaKey;
intuiTicks * = idcmpIntuiTicks;
idcmpUpdate * = idcmpIdcmpUpdate;
menuHelp * = idcmpMenuHelp;
changeWindow * = idcmpChangeWindow;
lonelyMessage * = idcmpLonelyMessage;
CONST
(* V34-style Window->Flags names: *)
windowSizing * = wflgSizeGadget;
windowDrag * = wflgDragBar;
windowDepth * = wflgDepthGadget;
windowClose * = wflgCloseGadget;
sizeBRight * = wflgSizeBRight;
sizeBBottom * = wflgSizeBBottom;
refreshBits * = wflgRefreshBits;
smartRefresh * = wflgSmartRefresh;
simpleRefresh * = wflgSimpleRefresh;
superBitmap * = wflgSuperBitmap;
otherRefresh * = wflgOtherRefresh;
backdrop * = wflgBackdrop;
reportMouse * = wflgReportMouse;
gimmeZeroZero * = wflgGimmeZeroZero;
borderless * = wflgBorderless;
activate * = wflgActivate;
windowActive * = wflgWindowActive;
inRequest * = wflgInRequest;
menuState * = wflgMenuState;
rmbTrap * = wflgRMBTrap;
noCareRefresh * = wflgNoCareRefresh;
windowRefresh * = wflgWindowRefresh;
wBenchWindow * = wflgWbenchWindow;
windowTicked * = wflgWindowTicked;
nwExtended * = wflgNwExtended;
visitor * = wflgVisitor;
zoomed * = wflgZoomed;
hasZoom * = wflgHasZoom;
(*
** $VER: intuitionbase.h 38.0 (12.6.91)
**
** Public part of IntuitionBase structure and supporting structures
*)
CONST
(* these are the display modes for which we have corresponding parameter
* settings in the config arrays
*)
dModeCount * = 0002H; (* how many modes there are *)
hiresPick * = 0000H;
lowresPick * = 0001H;
eventMax * = 10; (* size of event array *)
(* these are the system Gadget defines *)
resCount * = 2;
hiresGadget * = 0;
lowresGadget * = 1;
gadgetCount * = 8;
upFrontGadget * = 0;
downBackGadget * = 1;
sizeGadget * = 2;
closeGadget * = 3;
dragGadget * = 4;
sUpFrontGadget * = 5;
sDownBackGadget * = 6;
sDragGadget * = 7;
(* ======================================================================== *)
(* === IntuitionBase ====================================================== *)
(* ======================================================================== *)
(*
* Be sure to protect yourself against someone modifying these data as
* you look at them. This is done by calling:
*
* lock = LockIBase(0), which returns a E.ULONG. When done call
* UnlockIBase(lock) where lock is what LockIBase() returned.
*)
TYPE
(* This structure is strictly READ ONLY *)
IntuitionBasePtr * = CPOINTER TO IntuitionBase;
IntuitionBase * = RECORD (E.Library)
viewLord - : G.View;
activeWindow - : WindowPtr;
activeScreen - : ScreenPtr;
(* the FirstScreen variable points to the frontmost Screen. Screens are
* then maintained in a front to back order using Screen.NextScreen
*)
firstScreen - : ScreenPtr; (* for linked list of all screens *)
ibFlags - : SET; (* values are all system private *)
mouseY -, mouseX - : INTEGER;
(* note "backwards" order of these *)
seconds - : E.ULONG; (* timestamp of most current input event *)
micros - : E.ULONG; (* timestamp of most current input event *)
(* I told you this was private.
* The data beyond this point has changed, is changing, and
* will continue to change.
*)
END; (* IntuitionBase *)
(*-- Library Base variable --------------------------------------------*)
VAR
base * : IntuitionBasePtr;
CONST
name * = "intuition.library";
(*-- Library Functions ------------------------------------------------*)
(*
** $VER: intuition_protos.h 38.16 (28.8.92)
*)
(* Public functions OpenIntuition () and Intuition () are intentionally *)
(* not documented. *)
LIBCALL (base : IntuitionBasePtr) OpenIntuition * ();
-30;
LIBCALL (base : IntuitionBasePtr) Intuition*
( iEvent [8] : IE.InputEventBasePtr );
-36;
LIBCALL (base : IntuitionBasePtr) AddGadget*
( window [8] : WindowPtr;
VAR gadget [9] : Gadget;
position [0] : LONGINT )
: E.UWORD;
-42;
LIBCALL (base : IntuitionBasePtr) ClearDMRequest*
( window [8] : WindowPtr )
: BOOLEAN;
-48;
LIBCALL (base : IntuitionBasePtr) ClearMenuStrip*
( window [8] : WindowPtr );
-54;
LIBCALL (base : IntuitionBasePtr) ClearPointer*
( window [8] : WindowPtr );
-60;
LIBCALL (base : IntuitionBasePtr) CloseScreen*
( screen [8] : ScreenPtr )
: BOOLEAN;
-66;
LIBCALL (base : IntuitionBasePtr) OldCloseScreen*
( screen [8] : ScreenPtr );
-66;
LIBCALL (base : IntuitionBasePtr) CloseWindow*
( window [8] : WindowPtr );
-72;
LIBCALL (base : IntuitionBasePtr) CloseWorkBench * ()
: BOOLEAN;
-78;
LIBCALL (base : IntuitionBasePtr) CurrentTime*
( VAR seconds [8] : E.ULONG;
VAR micros [9] : E.ULONG );
-84;
LIBCALL (base : IntuitionBasePtr) DisplayAlert*
( alertNumber [0] : E.ULONG;
string [8] : ARRAY OF CHAR;
height [1] : LONGINT )
: BOOLEAN;
-90;
LIBCALL (base : IntuitionBasePtr) DisplayBeep*
( screen [8] : ScreenPtr );
-96;
LIBCALL (base : IntuitionBasePtr) DoubleClick*
( sSeconds [0] : E.ULONG;
sMicros [1] : E.ULONG;
cSeconds [2] : E.ULONG;
cMicros [3] : E.ULONG )
: BOOLEAN;
-102;
LIBCALL (base : IntuitionBasePtr) DrawBorder*
( rp [8] : G.RastPortPtr;
border [9] : BorderPtr;
leftOffset [0] : LONGINT;
topOffset [1] : LONGINT );
-108;
LIBCALL (base : IntuitionBasePtr) DrawImage*
( rp [8] : G.RastPortPtr;
VAR image [9] : Image;
leftOffset [0] : LONGINT;
topOffset [1] : LONGINT );
-114;
LIBCALL (base : IntuitionBasePtr) EndRequest*
( requester [8] : RequesterPtr;
window [9] : WindowPtr );
-120;
LIBCALL (base : IntuitionBasePtr) GetDefPrefs*
( VAR preferences [8] : ARRAY OF SYS.BYTE;
size [0] : LONGINT );
-126;
LIBCALL (base : IntuitionBasePtr) GetPrefs*
( VAR preferences [8] : ARRAY OF SYS.BYTE;
size [0] : LONGINT );
-132;
LIBCALL (base : IntuitionBasePtr) InitRequester*
( VAR requester [8] : Requester );
-138;
LIBCALL (base : IntuitionBasePtr) ItemAddress*
( VAR menuStrip [8] : Menu;
menuNumber [0] : LONGINT )
: MenuItemPtr;
-144;
LIBCALL (base : IntuitionBasePtr) ModifyIDCMP*
( window [8] : WindowPtr;
flags [0] : SET )
: BOOLEAN;
-150;
LIBCALL (base : IntuitionBasePtr) OldModifyIDCMP*
( window [8] : WindowPtr;
flags [0] : SET );
-150;
LIBCALL (base : IntuitionBasePtr) ModifyProp*
( VAR gadget [8] : Gadget;
window [9] : WindowPtr;
requester [10] : RequesterPtr;
flags [0] : E.WSET;
horizPot [1] : LONGINT;
vertPot [2] : LONGINT;
horizBody [3] : LONGINT;
vertBody [4] : LONGINT );
-156;
LIBCALL (base : IntuitionBasePtr) MoveScreen*
( screen [8] : ScreenPtr;
dx [0] : LONGINT;
dy [1] : LONGINT );
-162;
LIBCALL (base : IntuitionBasePtr) MoveWindow*
( window [8] : WindowPtr;
dx [0] : LONGINT;
dy [1] : LONGINT );
-168;
LIBCALL (base : IntuitionBasePtr) OffGadget*
( VAR gadget [8] : Gadget;
window [9] : WindowPtr;
requester [10] : RequesterPtr );
-174;
LIBCALL (base : IntuitionBasePtr) OffMenu*
( window [8] : WindowPtr;
menuNumber [0] : E.ULONG );
-180;
LIBCALL (base : IntuitionBasePtr) OnGadget*
( VAR gadget [8] : Gadget;
window [9] : WindowPtr;
requester [10] : RequesterPtr );
-186;
LIBCALL (base : IntuitionBasePtr) OnMenu*
( window [8] : WindowPtr;
menuNumber [0] : E.ULONG );
-192;
LIBCALL (base : IntuitionBasePtr) OpenScreen*
( VAR newScreen [8] : NewScreen )
: ScreenPtr;
-198;
LIBCALL (base : IntuitionBasePtr) OpenWindow*
( VAR newWindow [8] : NewWindow )
: WindowPtr;
-204;
LIBCALL (base : IntuitionBasePtr) OpenWorkBench * ()
: ScreenPtr;
-210;
LIBCALL (base : IntuitionBasePtr) PrintIText*
( rp [8] : G.RastPortPtr;
VAR iText [9] : IntuiText;
left [0] : LONGINT;
top [1] : LONGINT );
-216;
LIBCALL (base : IntuitionBasePtr) RefreshGadgets*
( gadgets [8] : GadgetPtr;
window [9] : WindowPtr;
requester [10] : RequesterPtr );
-222;
LIBCALL (base : IntuitionBasePtr) RemoveGadget*
( window [8] : WindowPtr;
VAR gadget [9] : Gadget )
: E.UWORD;
-228;
(* The official calling sequence for ReportMouse is given below. *)
(* Note the register order. For the complete story; read the ReportMouse *)
(* autodoc. *)
LIBCALL (base : IntuitionBasePtr) ReportMouse*
( window [8] : WindowPtr;
flag [0] : E.LBOOL );
-234;
LIBCALL (base : IntuitionBasePtr) Request*
( requester [8] : RequesterPtr;
window [9] : WindowPtr )
: BOOLEAN;
-240;
LIBCALL (base : IntuitionBasePtr) ScreenToBack*
( screen [8] : ScreenPtr );
-246;
LIBCALL (base : IntuitionBasePtr) ScreenToFront*
( screen [8] : ScreenPtr );
-252;
LIBCALL (base : IntuitionBasePtr) SetDMRequest*
( window [8] : WindowPtr;
requester [9] : RequesterPtr )
: BOOLEAN;
-258;
LIBCALL (base : IntuitionBasePtr) SetMenuStrip*
( window [8] : WindowPtr;
VAR menu [9] : Menu )
: BOOLEAN;
-264;
LIBCALL (base : IntuitionBasePtr) SetPointer*
( window [8] : WindowPtr;
pointer [9] : ARRAY OF SYS.BYTE;
height [0] : LONGINT;
width [1] : LONGINT;
xOffset [2] : LONGINT;
yOffset [3] : LONGINT );
-270;
LIBCALL (base : IntuitionBasePtr) SetWindowTitles*
( window [8] : WindowPtr;
windowTitle [9] : E.STRPTR;
screenTitle [10] : E.STRPTR );
-276;
LIBCALL (base : IntuitionBasePtr) ShowTitle*
( screen [8] : ScreenPtr;
showIt [0] : E.LBOOL );
-282;
LIBCALL (base : IntuitionBasePtr) SizeWindow*
( window [8] : WindowPtr;
dx [0] : LONGINT;
dy [1] : LONGINT );
-288;
LIBCALL (base : IntuitionBasePtr) ViewAddress * ()
: G.ViewPtr;
-294;
LIBCALL (base : IntuitionBasePtr) ViewPortAddress*
( window [8] : WindowPtr )
: G.ViewPortPtr;
-300;
LIBCALL (base : IntuitionBasePtr) WindowToBack*
( window [8] : WindowPtr );
-306;
LIBCALL (base : IntuitionBasePtr) WindowToFront*
( window [8] : WindowPtr );
-312;
LIBCALL (base : IntuitionBasePtr) WindowLimits*
( window [8] : WindowPtr;
widthMin [0] : LONGINT;
heightMin [1] : LONGINT;
widthMax [2] : LONGINT;
heightMax [3] : LONGINT )
: BOOLEAN;
-318;
(* --- start of next generation of names -------------------------------------*)
LIBCALL (base : IntuitionBasePtr) SetPrefs*
( preferences [8] : ARRAY OF SYS.BYTE;
size [0] : LONGINT;
inform [1] : E.LBOOL );
-324;
(* --- start of next next generation of names --------------------------------*)
LIBCALL (base : IntuitionBasePtr) IntuiTextLength*
( VAR iText [8] : IntuiText )
: INTEGER;
-330;
LIBCALL (base : IntuitionBasePtr) WBenchToBack * ()
: BOOLEAN;
-336;
LIBCALL (base : IntuitionBasePtr) WBenchToFront * ()
: BOOLEAN;
-342;
(* --- start of next next next generation of names ---------------------------*)
LIBCALL (base : IntuitionBasePtr) AutoRequest*
( window [8] : WindowPtr;
body [9] : IntuiTextPtr;
posText [10] : IntuiTextPtr;
negText [11] : IntuiTextPtr;
pFlag [0] : SET;
nFlag [1] : SET;
width [2] : LONGINT;
height [3] : LONGINT )
: BOOLEAN;
-348;
LIBCALL (base : IntuitionBasePtr) BeginRefresh*
( window [8] : WindowPtr );
-354;
LIBCALL (base : IntuitionBasePtr) BuildSysRequest*
( window [8] : WindowPtr;
body [9] : IntuiTextPtr;
posText [10] : IntuiTextPtr;
negText [11] : IntuiTextPtr;
flags [0] : SET;
width [1] : LONGINT;
height [2] : LONGINT )
: WindowPtr;
-360;
LIBCALL (base : IntuitionBasePtr) EndRefresh*
( window [8] : WindowPtr;
complete [0] : E.LBOOL );
-366;
LIBCALL (base : IntuitionBasePtr) FreeSysRequest*
( window [8] : WindowPtr );
-372;
LIBCALL (base : IntuitionBasePtr) MakeScreen*
( screen [8] : ScreenPtr );
-378;
LIBCALL (base : IntuitionBasePtr) RemakeDisplay * ();
-384;
LIBCALL (base : IntuitionBasePtr) RethinkDisplay * ();
-390;
(* --- start of next next next next generation of names ----------------------*)
LIBCALL (base : IntuitionBasePtr) AllocRemember*
( VAR rememberKey [8] : RememberPtr;
size [0] : E.ULONG;
flags [1] : SET )
: E.APTR;
-396;
(* Public function AlohaWorkbench () is intentionally not documented *)
LIBCALL (base : IntuitionBasePtr) AlohaWorkbench*
( wbport [8] : E.MsgPortPtr );
-402;
LIBCALL (base : IntuitionBasePtr) FreeRemember*
( VAR rememberPtr [8] : RememberPtr;
reallyForget [0] : E.LBOOL );
-408;
(* --- start of 15 Nov 85 names ------------------------*)
LIBCALL (base : IntuitionBasePtr) LockIBase*
( dontknow [0] : E.ULONG )
: E.ULONG;
-414;
LIBCALL (base : IntuitionBasePtr) UnlockIBase*
( ibLock [8] : E.ULONG );
-420;
(* --- functions in V33 or higher (distributed as Release 1.2) ---*)
LIBCALL (base : IntuitionBasePtr) GetScreenData*
( VAR buffer [8] : Screen;
size [0] : E.ULONG;
type [1] : E.WSET;
screen [9] : ScreenPtr )
: BOOLEAN;
-426;
LIBCALL (base : IntuitionBasePtr) RefreshGList*
( gadgets [8] : GadgetPtr;
window [9] : WindowPtr;
requester [10] : RequesterPtr;
numGad [0] : LONGINT );
-432;
LIBCALL (base : IntuitionBasePtr) AddGList*
( window [8] : WindowPtr;
gadget [9] : GadgetPtr;
position [0] : LONGINT;
numGad [1] : LONGINT;
requester [10] : RequesterPtr )
: E.UWORD;
-438;
LIBCALL (base : IntuitionBasePtr) RemoveGList*
( remPtr [8] : WindowPtr;
gadget [9] : GadgetPtr;
numGad [0] : LONGINT )
: E.UWORD;
-444;
LIBCALL (base : IntuitionBasePtr) ActivateWindow*
( window [8] : WindowPtr );
-450;
LIBCALL (base : IntuitionBasePtr) RefreshWindowFrame*
( window [8] : WindowPtr );
-456;
LIBCALL (base : IntuitionBasePtr) ActivateGadget*
( VAR gadgets [8] : Gadget;
window [9] : WindowPtr;
requester [10] : RequesterPtr )
: BOOLEAN;
-462;
LIBCALL (base : IntuitionBasePtr) NewModifyProp*
( VAR gadget [8] : Gadget;
window [9] : WindowPtr;
requester [10] : RequesterPtr;
flags [0] : E.WSET;
horizPot [1] : LONGINT;
vertPot [2] : LONGINT;
horizBody [3] : LONGINT;
vertBody [4] : LONGINT;
numGad [5] : LONGINT );
-468;
(* --- functions in V36 or higher (distributed as Release 2.0) ---*)
LIBCALL (base : IntuitionBasePtr) QueryOverscan*
( displayID [8] : E.ULONG;
VAR rect [9] : G.Rectangle;
oScanType [0] : LONGINT )
: LONGINT;
-474;
LIBCALL (base : IntuitionBasePtr) MoveWindowInFrontOf*
( window [8] : WindowPtr;
behindWindow [9] : WindowPtr );
-480;
LIBCALL (base : IntuitionBasePtr) ChangeWindowBox*
( window [8] : WindowPtr;
left [0] : LONGINT;
top [1] : LONGINT;
width [2] : LONGINT;
height [3] : LONGINT );
-486;
LIBCALL (base : IntuitionBasePtr) SetEditHook*
( hook [8] : U.HookPtr )
: U.HookPtr;
-492;
LIBCALL (base : IntuitionBasePtr) SetMouseQueue*
( window [8] : WindowPtr;
queueLength [0] : LONGINT )
: LONGINT;
-498;
LIBCALL (base : IntuitionBasePtr) ZipWindow*
( window [8] : WindowPtr );
-504;
(* --- public screens ---*)
LIBCALL (base : IntuitionBasePtr) LockPubScreen*
( name [8] : ARRAY OF CHAR )
: ScreenPtr;
-510;
LIBCALL (base : IntuitionBasePtr) UnlockPubScreen*
( name [8] : ARRAY OF CHAR;
screen [9] : ScreenPtr );
-516;
LIBCALL (base : IntuitionBasePtr) LockPubScreenList * ()
: E.ListPtr;
-522;
LIBCALL (base : IntuitionBasePtr) UnlockPubScreenList * ();
-528;
LIBCALL (base : IntuitionBasePtr) NextPubScreen*
( screen [8] : ScreenPtr;
VAR nameBuf [9] : ARRAY OF CHAR )
: E.STRPTR;
-534;
LIBCALL (base : IntuitionBasePtr) SetDefaultPubScreen*
( name [8] : ARRAY OF CHAR );
-540;
LIBCALL (base : IntuitionBasePtr) SetPubScreenModes*
( modes [0] : E.WSET )
: E.WSET;
-546;
LIBCALL (base : IntuitionBasePtr) PubScreenStatus*
( screen [8] : ScreenPtr;
statusFlags [0] : E.WSET )
: E.WSET;
-552;
LIBCALL (base : IntuitionBasePtr) ObtainGIRPort*
( gInfo [8] : GadgetInfoPtr )
: G.RastPortPtr;
-558;
LIBCALL (base : IntuitionBasePtr) ReleaseGIRPort*
( rp [8] : G.RastPortPtr );
-564;
LIBCALL (base : IntuitionBasePtr) GadgetMouse*
( VAR gadget [8] : Gadget;
gInfo [9] : GadgetInfoPtr;
VAR mousePoint [10] : G.Point );
-570;
LIBCALL (base : IntuitionBasePtr) GetDefaultPubScreen*
( VAR nameBuffer [8] : ARRAY OF CHAR );
-582;
LIBCALL (base : IntuitionBasePtr) EasyRequestArgs*
( window [8] : WindowPtr;
easyStruct [9] : EasyStructPtr;
idcmpPtr [10] : E.APTR;
args [11] : ARRAY OF SYS.LONGWORD )
: LONGINT;
-588;
LIBCALL (base : IntuitionBasePtr) EasyRequest*
( window [8] : WindowPtr;
easyStruct [9] : EasyStructPtr;
idcmpPtr [10] : E.APTR;
args [11].. : SYS.LONGWORD )
: LONGINT;
-588;
LIBCALL (base : IntuitionBasePtr) BuildEasyRequestArgs*
( window [8] : WindowPtr;
easyStruct [9] : EasyStructPtr;
idcmp [0] : SET;
args [10] : ARRAY OF SYS.LONGWORD )
: WindowPtr;
-594;
LIBCALL (base : IntuitionBasePtr) BuildEasyRequest*
( window [8] : WindowPtr;
easyStruct [9] : EasyStructPtr;
idcmp [0] : SET;
args [10].. : SYS.LONGWORD )
: WindowPtr;
-594;
LIBCALL (base : IntuitionBasePtr) SysReqHandler*
( window [8] : WindowPtr;
idcmpPtr [9] : E.APTR;
waitInput [0] : E.LBOOL )
: LONGINT;
-600;
LIBCALL (base : IntuitionBasePtr) OpenWindowTagList*
( VAR newWindow [8] : NewWindow;
tagList [9] : ARRAY OF U.TagItem )
: WindowPtr;
-606;
LIBCALL (base : IntuitionBasePtr) OpenWindowTags*
( VAR newWindow [8] : NewWindow;
tagList [9].. : U.Tag )
: WindowPtr;
-606;
LIBCALL (base : IntuitionBasePtr) OpenWindowTagListA*
( newWindow [8] : NewWindowPtr;
tagList [9] : ARRAY OF U.TagItem )
: WindowPtr;
-606;
LIBCALL (base : IntuitionBasePtr) OpenWindowTagsA*
( newWindow [8] : NewWindowPtr;
tagList [9].. : U.Tag )
: WindowPtr;
-606;
LIBCALL (base : IntuitionBasePtr) OpenScreenTagList*
( VAR newScreen [8] : NewScreen;
tagList [9] : ARRAY OF U.TagItem )
: ScreenPtr;
-612;
LIBCALL (base : IntuitionBasePtr) OpenScreenTags*
( VAR newScreen [8] : NewScreen;
tagList [9].. : U.Tag )
: ScreenPtr;
-612;
LIBCALL (base : IntuitionBasePtr) OpenScreenTagListA*
( newScreen [8] : NewScreenPtr;
tagList [9] : ARRAY OF U.TagItem )
: ScreenPtr;
-612;
LIBCALL (base : IntuitionBasePtr) OpenScreenTagsA*
( newScreen [8] : NewScreenPtr;
tagList [9].. : U.Tag )
: ScreenPtr;
-612;
(* new Image functions *)
LIBCALL (base : IntuitionBasePtr) DrawImageState*
( rp [8] : G.RastPortPtr;
VAR image [9] : Image;
leftOffset [0] : LONGINT;
topOffset [1] : LONGINT;
state [2] : E.ULONG;
drawInfo [10] : DrawInfoPtr );
-618;
LIBCALL (base : IntuitionBasePtr) PointInImage*
( point [0] : E.ULONG;
VAR image [8] : Image )
: BOOLEAN;
-624;
LIBCALL (base : IntuitionBasePtr) EraseImage*
( rp [8] : G.RastPortPtr;
VAR image [9] : Image;
leftOffset [0] : LONGINT;
topOffset [1] : LONGINT );
-630;
LIBCALL (base : IntuitionBasePtr) NewObjectA*
( classPtr [8] : IClassPtr;
classID [9] : ARRAY OF CHAR;
tagList [10] : ARRAY OF U.TagItem )
: E.APTR;
-636;
LIBCALL (base : IntuitionBasePtr) NewObject*
( classPtr [8] : IClassPtr;
classID [9] : ARRAY OF CHAR;
tagList [10].. : U.Tag )
: E.APTR;
-636;
LIBCALL (base : IntuitionBasePtr) DisposeObject*
( object [8] : E.APTR );
-642;
LIBCALL (base : IntuitionBasePtr) SetAttrsA*
( object [8] : E.APTR;
tagList [9] : ARRAY OF U.TagItem )
: E.ULONG;
-648;
LIBCALL (base : IntuitionBasePtr) SetAttrs*
( object [8] : E.APTR;
tagList [9].. : U.Tag )
: E.ULONG;
-648;
LIBCALL (base : IntuitionBasePtr) GetAttr*
( attrID [0] : E.ULONG;
object [8] : E.APTR;
VAR storage [9] : ARRAY OF SYS.BYTE )
: E.ULONG;
-654;
(* special set attribute call for gadgets *)
LIBCALL (base : IntuitionBasePtr) SetGadgetAttrsA*
( VAR gadget [8] : Gadget;
window [9] : WindowPtr;
requester [10] : RequesterPtr;
tagList [11] : ARRAY OF U.TagItem )
: E.ULONG;
-660;
LIBCALL (base : IntuitionBasePtr) SetGadgetAttrs*
( VAR gadget [8] : Gadget;
window [9] : WindowPtr;
requester [10] : RequesterPtr;
tagList [11].. : U.Tag )
: E.ULONG;
-660;
(* for class implementors only *)
LIBCALL (base : IntuitionBasePtr) NextObject*
( VAR objectPtr [8] : ObjectPtr )
: E.APTR;
-666;
LIBCALL (base : IntuitionBasePtr) MakeClass*
( classID [8] : ARRAY OF CHAR;
superClassID [9] : ARRAY OF CHAR;
superClassPtr [10] : IClassPtr;
instanceSize [0] : LONGINT;
flags [1] : SET )
: IClassPtr;
-678;
LIBCALL (base : IntuitionBasePtr) AddClass*
( classPtr [8] : IClassPtr );
-684;
LIBCALL (base : IntuitionBasePtr) GetScreenDrawInfo*
( screen [8] : ScreenPtr ) : DrawInfoPtr;
-690;
LIBCALL (base : IntuitionBasePtr) FreeScreenDrawInfo*
( screen [8] : ScreenPtr;
drawInfo [9] : DrawInfoPtr );
-696;
LIBCALL (base : IntuitionBasePtr) ResetMenuStrip*
( window [8] : WindowPtr;
VAR menu [9] : Menu )
: BOOLEAN;
-702;
LIBCALL (base : IntuitionBasePtr) RemoveClass*
( classPtr [8] : IClassPtr );
-708;
LIBCALL (base : IntuitionBasePtr) FreeClass*
( classPtr [8] : IClassPtr )
: BOOLEAN;
-714;
(*--- functions in V39 or higher (Release 3) ---*)
LIBCALL (base : IntuitionBasePtr) AllocScreenBuffer *
( sc [8] : ScreenPtr;
bm [9] : G.BitMapPtr;
flags [0] : SET )
: ScreenBufferPtr;
-768;
LIBCALL (base : IntuitionBasePtr) FreeScreenBuffer *
( sc [8] : ScreenPtr;
sb [9] : ScreenBufferPtr );
-774;
LIBCALL (base : IntuitionBasePtr) ChangeScreenBuffer *
( sc [8] : ScreenPtr;
sb [9] : ScreenBufferPtr )
: BOOLEAN;
-780;
LIBCALL (base : IntuitionBasePtr) ScreenDepth *
( screen [8] : ScreenPtr;
flags [0] : SET;
reserved [9] : E.APTR );
-786;
LIBCALL (base : IntuitionBasePtr) ScreenPosition *
( screen [8] : ScreenPtr;
flags [0] : SET;
x1 [1] : LONGINT;
y1 [2] : LONGINT;
x2 [3] : LONGINT;
y2 [4] : LONGINT );
-792;
LIBCALL (base : IntuitionBasePtr) ScrollWindowRaster *
( win [9] : WindowPtr;
dx [0] : LONGINT;
dy [1] : LONGINT;
xMin [2] : LONGINT;
yMin [3] : LONGINT;
xMax [4] : LONGINT;
yMax [5] : LONGINT );
-798;
LIBCALL (base : IntuitionBasePtr) LendMenus *
( fromwindow [8] : WindowPtr;
towindow [9] : WindowPtr );
-804;
LIBCALL (base : IntuitionBasePtr) DoGadgetMethodA *
( gad [8] : GadgetPtr;
win [9] : WindowPtr;
req [10] : RequesterPtr;
VAR message [11] : Msg )
: E.ULONG;
-810;
LIBCALL (base : IntuitionBasePtr) DoGadgetMethod *
( gad [8] : GadgetPtr;
win [9] : WindowPtr;
req [10] : RequesterPtr;
message [11]..: SYS.LONGWORD )
: E.ULONG;
-810;
LIBCALL (base : IntuitionBasePtr) SetWindowPointerA *
( win [8] : WindowPtr;
taglist [9] : ARRAY OF U.TagItem );
-816;
LIBCALL (base : IntuitionBasePtr) SetWindowPointer *
( win [8] : WindowPtr;
taglist [9]..: U.Tag );
-816;
LIBCALL (base : IntuitionBasePtr) TimedDisplayAlert *
( alertNumber [0] : E.ULONG;
string [8] : ARRAY OF CHAR;
height [1] : E.ULONG;
time [9] : E.ULONG )
: BOOLEAN;
-822;
LIBCALL (base : IntuitionBasePtr) HelpControl *
( win [8] : WindowPtr;
flags [0] : SET );
-828;
(*-- C Macros defined as procedures -----------------------------------*)
(* $L+ Absolute long addressing for globals *)
(*-----------------------------------*)
PROCEDURE MenuNum * (n : INTEGER) : INTEGER;
BEGIN (* MenuNum *)
RETURN SYS.AND (n, 01FH)
END MenuNum;
(*-----------------------------------*)
PROCEDURE ItemNum * (n : INTEGER) : INTEGER;
BEGIN (* ItemNum *)
RETURN SYS.AND (SYS.LSH (n, -5), 03FH)
END ItemNum;
(*-----------------------------------*)
PROCEDURE SubNum * (n : INTEGER) : INTEGER;
BEGIN (* SubNum *)
RETURN SYS.AND (SYS.LSH (n, -11), 01FH)
END SubNum;
(*-----------------------------------*)
PROCEDURE ShiftMenu * (n : INTEGER) : INTEGER;
BEGIN (* ShiftMenu *)
RETURN SYS.AND (n, 01FH)
END ShiftMenu;
(*-----------------------------------*)
PROCEDURE ShiftItem * (n : INTEGER) : INTEGER;
BEGIN (* ShiftItem *)
RETURN SYS.LSH (SYS.AND (n, 03FH), 5)
END ShiftItem;
(*-----------------------------------*)
PROCEDURE ShiftSub * (n : INTEGER) : INTEGER;
BEGIN (* ShiftSub *)
RETURN SYS.LSH (SYS.AND (n, 01FH), 11)
END ShiftSub;
(*-----------------------------------*)
PROCEDURE FullMenuNum * (menu, item, sub : INTEGER) : INTEGER;
BEGIN (* FullMenuNum *)
RETURN ShiftMenu (menu) + ShiftItem (item) + ShiftSub (sub)
END FullMenuNum;
(*------------------------------------*)
PROCEDURE SRBNum * ( n : E.UBYTE ) : SHORTINT;
(* SerRWBits -> read bits per char *)
BEGIN (* SRBNum *)
RETURN (8 - SYS.VAL (SHORTINT, SYS.LSH (n, -4)))
END SRBNum;
(*------------------------------------*)
PROCEDURE SWBNum * ( n : E.UBYTE ) : SHORTINT;
(* SerRWBits -> write bits per chr *)
BEGIN (* SWBNum *)
RETURN (8 - SYS.VAL (SHORTINT, SYS.AND (n, 0FH)))
END SWBNum;
(*------------------------------------*)
PROCEDURE SSBNum * ( n : E.UBYTE ) : SHORTINT;
(* SerStopBuf -> stop bits per chr *)
BEGIN (* SSBNum *)
RETURN (1 + SYS.VAL (SHORTINT, SYS.LSH (n, -4)))
END SSBNum;
(*------------------------------------*)
PROCEDURE SParNum * ( n : E.UBYTE ) : SHORTINT;
(* SerParShk -> parity setting *)
BEGIN (* SParNum *)
RETURN SYS.LSH (n, -4)
END SParNum;
(*------------------------------------*)
PROCEDURE ShakNum * ( n : E.UBYTE ) : SHORTINT;
(* SerParShk -> handshake mode *)
BEGIN (* ShakNum *)
RETURN SYS.AND (n, 0FH)
END ShakNum;
(* some convenient macros and casts *)
(*-----------------------------------*)
PROCEDURE GadgetBox * (VAR g : Gadget) : IBoxPtr;
BEGIN (* GadgetBox *)
RETURN SYS.ADR (g.leftEdge)
END GadgetBox;
(*-----------------------------------*)
PROCEDURE IMBox * (VAR im : Image) : IBoxPtr;
BEGIN (* IMBox *)
RETURN SYS.ADR (im.leftEdge)
END IMBox;
(*-----------------------------------*)
PROCEDURE FGPen * (VAR im : Image) : SHORTINT;
BEGIN (* FGPen *)
RETURN SYS.VAL (SHORTINT, im.planePick)
END FGPen;
(*-----------------------------------*)
PROCEDURE BGPen * (VAR im : Image) : SHORTINT;
BEGIN (* BGPen *)
RETURN SYS.VAL (SHORTINT, im.planeOnOff)
END BGPen;
(*-----------------------------------*)
PROCEDURE CustomHook * (VAR gadget : Gadget) : U.HookPtr;
(* this casts MutualExclude for easy assignment of a hook
* pointer to the unused MutualExclude field of a custom gadget
*)
BEGIN (* CustomHook *)
RETURN SYS.VAL (U.HookPtr, gadget.mutualExclude)
END CustomHook;
(*------------------------------------*)
PROCEDURE InstData* (cl : IClassPtr; o : ObjectPtr) : E.APTR;
BEGIN
RETURN SYS.VAL (E.APTR, (SYS.VAL(LONGINT,o) + LONG(cl.instOffset)));
END InstData;
(*------------------------------------*)
PROCEDURE SizeOfInstance* (cl : IClassPtr) : LONGINT;
BEGIN
RETURN cl.instOffset + cl.instSize + SIZE(Object);
END SizeOfInstance;
(*------------------------------------*)
PROCEDURE BaseObject * ( obj : ObjectPtr ) : ObjectPtr;
BEGIN (* BaseObject *)
RETURN SYS.VAL (ObjectPtr, SYS.VAL (LONGINT, obj) + SIZE (Object));
END BaseObject;
(*------------------------------------*)
PROCEDURE OClass* (o : ObjectPtr) : IClassPtr;
BEGIN
o := SYS.VAL (ObjectPtr, SYS.VAL (LONGINT, o) - SIZE (Object));
RETURN o.class
END OClass;
(*-- Library Base variable --------------------------------------------*)
(* $L- Address globals through A4 *)
PROCEDURE* Close ();
BEGIN (* Close *)
IF base # NIL THEN E.base.CloseLibrary (base) END
END Close;
BEGIN (* Library *)
base :=
SYS.VAL
( IntuitionBasePtr,
E.base.OpenLibrary (name, E.libraryMinimum));
IF base = NIL THEN HALT (100) END;
SYS.SETCLEANUP (Close)
END Intuition.